physical

Posted By: GaniX

physical - 08/11/13 16:40

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
Posted By: jcl

Re: physical - 08/12/13 13:06

Yes, if the object moves faster than its own size, then you must use CCD. I have not much experience with CCD, so I can't give good advices here, but I would use a collision shape, not a single point.
Posted By: GaniX

Re: physical - 08/13/13 22:07

ok i use convex and run fine, and i do biger size off the model and run fine also i use convex
© 2024 lite-C Forums