diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_3d/godot_space_3d.cpp | 1 | ||||
-rw-r--r-- | servers/physics_server_3d.h | 1 |
2 files changed, 2 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; diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index ca1ff57c99..922baad663 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -541,6 +541,7 @@ public: Vector3 position; Vector3 normal; Vector3 collider_velocity; + Vector3 collider_angular_velocity; real_t depth = 0.0; int local_shape = 0; ObjectID collider_id; |