0 votes

How does one use the _integrate_forces function of the rigidbody node? E.g. for manipulating the angular_velocity?
Examples are appreciated

in Engine by (35 points)

1 Answer

0 votes

The benefit of using _integrate_forces with your RigidBody node is that it passes you the Physics2DDirectBodyState, which contains a lot of information about the body's state:


That means that you can directly affect angular velocity by using state.get_angular_velocity() and state.set_angular_velocity()

See here for an example of using _integrate_forces: https://youtu.be/J2MItemlTcE

by (21,920 points)

Thank you, especially for the link I, unfortunately, hadn't found before

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.