diff options
author | Ricardo Buring <ricardo.buring@gmail.com> | 2022-03-20 10:31:03 +0100 |
---|---|---|
committer | Ricardo Buring <ricardo.buring@gmail.com> | 2022-03-20 10:31:03 +0100 |
commit | 3d4be5d4c2469a2a242599f805fd0282c2e25620 (patch) | |
tree | 78b5cd9f4c42812618c97927ae6e3722c6fc63c6 /servers/physics_2d | |
parent | 19950076b1edbd924b64ed41d27a5239ca0c1a7b (diff) |
Raycasts hitting from inside: return collision point in global coordinates
Diffstat (limited to 'servers/physics_2d')
-rw-r--r-- | servers/physics_2d/godot_space_2d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_2d/godot_space_2d.cpp b/servers/physics_2d/godot_space_2d.cpp index 04b8d3c741..99c0566fb1 100644 --- a/servers/physics_2d/godot_space_2d.cpp +++ b/servers/physics_2d/godot_space_2d.cpp @@ -158,7 +158,7 @@ bool GodotPhysicsDirectSpaceState2D::intersect_ray(const RayParameters &p_parame if (p_parameters.hit_from_inside) { // Hit shape at starting point. min_d = 0; - res_point = local_from; + res_point = begin; res_normal = Vector2(); res_shape = shape_idx; res_obj = col_obj; |