physX forward movement after a pan

Posted By: bpc31

physX forward movement after a pan - 05/15/11 15:16

Does anyone have any sample code for physX car movement that doesn't use wheels? When I use this code the boat moves in global X direction not relative to the boats pan orientation. How do I make my nullvector variable the boat's new orientation?

Code:
while(1)
{
	if (key_cuu == 1)
	{
	pXent_addforcelocal(my, vector(1000,0,0), nullvector);
	}
	
	if (key_cul == 1)
	{
	pXent_addtorquelocal(my, vector(0,0,1000));
	}
		
	if (key_cur == 1)
	{
	pXent_addtorquelocal(my, vector(0,0,-1000));
	}
	wait(1);
}


Posted By: bpc31

Re: physX forward movement after a pan - 05/21/11 00:20

Nobody has created vehicle physX w/o wheels? Samples please! laugh
Posted By: Superku

Re: physX forward movement after a pan - 05/21/11 00:29

Have a look at vec_rotate (in combination with my.pan)!
© 2024 lite-C Forums