summaryrefslogtreecommitdiffstats
path: root/scene/3d/physics_body_3d.h
diff options
context:
space:
mode:
authorfabriceci <fabricecipolla@gmail.com>2022-07-29 22:00:04 +0200
committerfabriceci <fabricecipolla@gmail.com>2022-08-24 18:03:12 +0200
commit3f9db7b398bd18248c486297ad8bdc7b38eed3ed (patch)
treeb4ab9ba2dc658ddc1a808514f00e8a756d5b78ed /scene/3d/physics_body_3d.h
parent0626ce50cfd35d1eb81c6c9627f8540be9636b4b (diff)
downloadredot-engine-3f9db7b398bd18248c486297ad8bdc7b38eed3ed.tar.gz
Adds a method to return the angular velocity of a platform
Diffstat (limited to 'scene/3d/physics_body_3d.h')
-rw-r--r--scene/3d/physics_body_3d.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h
index 96e1688c23..ecc1def35b 100644
--- a/scene/3d/physics_body_3d.h
+++ b/scene/3d/physics_body_3d.h
@@ -370,6 +370,7 @@ public:
const Vector3 &get_real_velocity() const;
real_t get_floor_angle(const Vector3 &p_up_direction = Vector3(0.0, 1.0, 0.0)) const;
const Vector3 &get_platform_velocity() const;
+ const Vector3 &get_platform_angular_velocity() const;
virtual Vector3 get_linear_velocity() const override;
@@ -422,6 +423,7 @@ private:
Vector3 ceiling_normal;
Vector3 last_motion;
Vector3 platform_velocity;
+ Vector3 platform_angular_velocity;
Vector3 platform_ceiling_velocity;
Vector3 previous_position;
Vector3 real_velocity;