🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

PhysX, how PxVec3 mutiply rotate ?

Started by
0 comments, last by bluesteaik 4 years, 2 months ago

I want to shot with PxVec3(Direction) + 45 degree upper direction.

my code is

auto PxDir = PxVec3( pvDir->x, pvDir->y, pvDir->z );
PxQuat q( D3DXToRadian(45), PxVec3(1,0,0));
auto PxDir45 = q.rotate( PxDir );
pBox->setLinearVelocity( PxDir45 * 300 );

but It's not work correctly.

Just work in only d3dxvector3(0,0,1).

and In the other direction, not 45 degree.

Please help…

This topic is closed to new replies.

Advertisement