When to multiply with delta?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Wurzelpilz

I’m really confused by the use of delta and the documentation don’t contain any information about this, which functions do include delta? I think move_and_slide already multiplies by delta?.. what about apply_torque_impulse, add_force or add_torque? Do I need to multiply with delta? If yes the numbers I have to use are abnormous big,

:bust_in_silhouette: Reply From: estebanmolca

Move and slide includes it but for other movements like jumping you would have to use delta so that their speeds and/or acceleration are dependent on time and not on their fps.

I believe that force and torque are only for rigid bodies (their movement is completely handled by the physics engine) but if you want to apply force or torque manually there is a specific function for it:

void _integrate_forces ( PhysicsDirectBodyState state ) virtual

(See rigidbody in the manual)