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:
@ -60,6 +60,8 @@ public:
|
||||
virtual void set_transform(const Transform2D &p_transform) = 0;
|
||||
virtual Transform2D get_transform() const = 0;
|
||||
|
||||
virtual Vector2 get_velocity_at_local_position(const Vector2 &p_position) const = 0;
|
||||
|
||||
virtual void add_central_force(const Vector2 &p_force) = 0;
|
||||
virtual void add_force(const Vector2 &p_offset, const Vector2 &p_force) = 0;
|
||||
virtual void add_torque(real_t p_torque) = 0;
|
||||
|
||||
Reference in New Issue
Block a user