Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

PhysX, how PxVec3 mutiply rotate ?

$
0
0

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…


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>