Fix applied rotation from moving platforms in move_and_slide

When synchronizing CharacterBody motion with moving the platform using
direct body state, only the linear velocity was taken into account.

This change exposes velocity at local point in direct body state and
uses it in move_and_slide to get the proper velocity that includes
rotations.
This commit is contained in:
PouleyKetchoupp 2021-08-09 12:14:24 -07:00
parent 0cee8831b2
commit 5650c83e4b
12 changed files with 48 additions and 2 deletions

View file

@ -138,6 +138,13 @@
Returns the current state of the space, useful for queries.
</description>
</method>
<method name="get_velocity_at_local_position" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="local_position" type="Vector3" />
<description>
Returns the body's velocity at the given relative position, including both translation and rotation.
</description>
</method>
<method name="integrate_forces">
<return type="void" />
<description>