Fix applied rotation from moving platforms in move_and_slide

When synchronizing KinematicBody 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 11:57:17 -07:00
parent d5a0b2e8bf
commit f101349225
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>