+1 vote

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 moveandslide already multiplies by delta?... what about applytorqueimpulse, add_force or add_torque? Do I need to multiply with delta? If yes the numbers I have to use are abnormous big,

in Engine by (163 points)

1 Answer

+1 vote

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 integrateforces ( PhysicsDirectBodyState state ) virtual

(See rigidbody in the manual)

by (2,258 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.