How does one use the _integrate_forces function of the rigidbody node? E.g. for manipulating the angular_velocity? Examples are appreciated
_integrate_forces
rigidbody
angular_velocity
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:
Physics2DDirectBodyState
http://docs.godotengine.org/en/latest/classes/class_physics2ddirectbodystate.html#class-physics2ddirectbodystate
That means that you can directly affect angular velocity by using state.get_angular_velocity() and state.set_angular_velocity()
state.get_angular_velocity()
state.set_angular_velocity()
See here for an example of using _integrate_forces: https://youtu.be/J2MItemlTcE
Thank you, especially for the link I, unfortunately, hadn’t found before
Löwenhügel | 2017-09-03 17:03