summaryrefslogtreecommitdiff
path: root/servers/physics_3d
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:39:35 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:39:35 +0100
commit151e1355e80f0044042992bb8a4a4f33ccc1e41b (patch)
tree8b46014c83436dcd9ab91d6493a921ea2a125e02 /servers/physics_3d
parent7e2209308977372ce9ab649367b007de863b0f44 (diff)
parent3f9db7b398bd18248c486297ad8bdc7b38eed3ed (diff)
Merge pull request #63650 from fabriceci/apply-moving-platform-angular-velocity
Allow to apply the angular velocity of a moving platform
Diffstat (limited to 'servers/physics_3d')
-rw-r--r--servers/physics_3d/godot_space_3d.cpp1
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 c98409e2c4..813970848a 100644
--- a/servers/physics_3d/godot_space_3d.cpp
+++ b/servers/physics_3d/godot_space_3d.cpp
@@ -992,6 +992,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;