The linear damping of PxRigidBody #241
-
Hello NVIDIA Devs, I have adjusted the damping of a PxRigidBody to 0.01 using the we can derive that the maximum velocity is given by: This suggests that the maximum velocity should indeed be related to the mass of the object. I'm puzzled as to why this isn't the case in my observations. Do you have any thoughts on why this is happening? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @SHiziw, Linear damping does not apply a force proportional to velocity, but scales the (unconstrained, pre-integrated) velocities each time step with
see, for example, here: https://github.com/NVIDIA-Omniverse/PhysX/blob/main/physx/source/lowleveldynamics/src/DyBodyCoreIntegrator.h#L62 I agree that the documentation does not make this clear enough, I'll update it. |
Beta Was this translation helpful? Give feedback.
Hi @SHiziw,
Linear damping does not apply a force proportional to velocity, but scales the (unconstrained, pre-integrated) velocities each time step with
max(0, 1 - linear_damping * dt)
see, for example, here: https://github.com/NVIDIA-Omniverse/PhysX/blob/main/physx/source/lowleveldynamics/src/DyBodyCoreIntegrator.h#L62
I agree that the documentation does not make this clear enough, I'll update it.
Philipp