- Home /
How does unity add torque
What are the equation/equations used in PhysX for adding torque to a rigidbody? and what mathematical representation does is use to store/add torque? Euler angles? Body rates?
Answer by Edy · Dec 28, 2021 at 10:22 AM
Most likely not the equations you would expect. PhysX uses a simplified dynamics model for efficiency rather than accuracy:
https://forums.developer.nvidia.com/t/are-eulers-equations-integrated-for-a-pxrigiddynamic-in-pxscene-simulate-dt/27677/3
Anyways, the source code of PhysX is available here:
https://github.com/NVIDIAGameWorks/PhysX/tree/4.1/physx/source/physx/src
The files you may want to look at are NpRigidDynamic.cpp/h (=Rigidbody) and NpScene.cpp.
Your answer
Follow this Question
Related Questions
Compute the torque needed to rotate an object at a constant rate 3 Answers
Rigidbody rotation with PID controller and torque 0 Answers
Add torque is not behaving same in opposite Y direction. Need help! 1 Answer
Constant Force doesn't work 0 Answers
Returning a rigidbody back to its original x and z rotations through physics forces. 2 Answers