I can’t figure this out. Suppose
PxRigidDynamic* aBody = CreateSomeBody(); // non-symmetric, with 3 different inertia coefficients
PxVec3 newW = aBody->getAngularVelocity();
What exactly is this angular velocity vector I am setting/getting? For both body frame and world frame I expect the angular velocity components to change with time. Instead what I see is that the angular velocity vector remains constant throughout the simulation (assuming no other forces or collisions in the scene).
One option is that I am not understanding what exactly is begin set/get with these functions. The other option is that PhysX does not integrate the rigid body dynamics, just spinning the actors according to the specified angular velocity vectors. Can someone here set me straight on this issue?
I don’t know exactly what your core problem really is, but one thing comes to mind.
PhysX does indeed integrate the angular velocity. And you should be able to read these values sometime after fetchResults (set/getAngularVelocity should work like you would expect).
If no external forces/collisions or damping exist, then there’s no acceleration (change in velocity). If you turn on damping and you see your angular velocity decrease, then it’s probably working correctly.
Thanks for the reply. However this is not correct. With no external forces, collisions, or damping, I still expect to see the angular velocity change, in both the body frame and the world frame. It is possible that PhysX chooses to keep a constant angular velocity vector instead of a constant angular momentum vector for performance reasons, although this will result in unrealistic motion. It would be good to know for sure though. If anyone knows the answer it would be most appreciated.
This is not for a specific game problem, I am simply trying to understand the limitations of realistic motion in PhysX, and my understanding of the API.