PhysX move object??

Posted By: jojo1995

PhysX move object?? - 02/28/11 19:31

hi all
how to move object in PhysX???
i need example plz
Posted By: xxxxxxx

Re: PhysX move object?? - 02/28/11 19:52

i wrote you an example at the last time, can you remember! look at the function which i used to rotate the objekt you just need to change a vector(i dont know wihich vector you have to change so look at the manual! im to lazy right now)
xxxxxxx
Posted By: jojo1995

Re: PhysX move object?? - 03/01/11 15:20

yes i know
at the last time you give me rotate object in PhysX
give me example for move in PhysX
Posted By: xxxxxxx

Re: PhysX move object?? - 03/01/11 16:10

Code:
action djhero()
{
	VECTOR pos;// mabye you'll need VECTOR* pos;
	pXent_settype(my,PH_RIGID,PH_CONVEX);// makes the entity to a phsiks ent. try some other collisionsmodes
	pXent_kinematic(me,1);// remove the gravity and other phsiks effekts
	while(1)
	{
		vec_set(pos,vector(my.x+?,my.y+?,my.z+?));// creates the position
		pXent_moveglobal( me, pos, vector(?Pan,?Tilt,?Roll));// rotate the ent
		wait(1);
	}
}


so it's the same function but i've change some you need pos to change the position(my.x+?(...) is needed)
xxxxxxx
Posted By: jojo1995

Re: PhysX move object?? - 03/01/11 16:21

thank you
it is work but it is not stop at the wall like "c-move"
Posted By: xxxxxxx

Re: PhysX move object?? - 03/01/11 16:25

huh? is the wall a physXent. physXents wont stop at a non-PhysX_ent. that was your last problem with the ball, too!
xxxxxxx
Posted By: jojo1995

Re: PhysX move object?? - 03/01/11 16:31

what??? i don't know you
plz help me
Posted By: xxxxxxx

Re: PhysX move object?? - 03/01/11 16:57

for your walls:
Code:
pXent_settype(wall,PH_RIGID,PH_CONVEX/POLY);


please look at the manual and the physX tutorial in the workshops wink
xxxxxxx
Posted By: GaniX

Re: PhysX move object?? - 08/11/13 17:14

mmmm sorry interrupt but read this post and i can not resist to do the next question:

hello people .
i have the next problem
i try to make a real physical move off the object (for example a box),when i shoot, i use this code to do that :

Code:
if(c_trace(..))
{
	if(you)
	{
		if(you.skill23 == 1337)
		{
			VECTOR vForce;
			vec_set(vForce, vector(100, 0, 0));
			vec_rotate(vForce, pTraceHit.rotation);
			pXent_addforceglobal(you, vForce, hit.x);
		}
	}



its work fine, but i have a new problem:

when i shoot the box can move trought the wall or floor, i read something about use the pX_setccd and pXent_setccdskeleton;then i put on the main this physX_load(); and in the acction of box this pX_setccd ( 1 );
pXent_setccdskeleton( box, vector(0, 0, 0), 1 );to make vertex colision, and then i test, but the problem is continues.
help pls !!!!
thank

note:i post this in other site of the forum... im sorry but i had no idea this section exist. i have no internet in my house and i can not see this before
© 2024 lite-C Forums