diff options
author | fabriceci <fabricecipolla@gmail.com> | 2022-07-29 22:00:04 +0200 |
---|---|---|
committer | fabriceci <fabricecipolla@gmail.com> | 2022-08-24 18:03:12 +0200 |
commit | 3f9db7b398bd18248c486297ad8bdc7b38eed3ed (patch) | |
tree | b4ab9ba2dc658ddc1a808514f00e8a756d5b78ed /servers/physics_3d/godot_space_3d.cpp | |
parent | 0626ce50cfd35d1eb81c6c9627f8540be9636b4b (diff) |
Adds a method to return the angular velocity of a platform
Diffstat (limited to 'servers/physics_3d/godot_space_3d.cpp')
-rw-r--r-- | servers/physics_3d/godot_space_3d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/physics_3d/godot_space_3d.cpp b/servers/physics_3d/godot_space_3d.cpp index 074232dd66..8415811ca0 100644 --- a/servers/physics_3d/godot_space_3d.cpp +++ b/servers/physics_3d/godot_space_3d.cpp @@ -991,6 +991,7 @@ bool GodotSpace3D::test_body_motion(GodotBody3D *p_body, const PhysicsServer3D:: Vector3 rel_vec = result.contact - (body->get_transform().origin + body->get_center_of_mass()); collision.collider_velocity = body->get_linear_velocity() + (body->get_angular_velocity()).cross(rel_vec); + collision.collider_angular_velocity = body->get_angular_velocity(); } r_result->travel = safe * p_parameters.motion; |