Merge pull request #59346 from rburing/raycast_from_inside_global

Raycasts hitting from inside: return collision point in global coordinates
This commit is contained in:
Rémi Verschelde 2022-03-20 12:03:01 +01:00 committed by GitHub
commit b05e56e90d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -153,7 +153,7 @@ bool GodotPhysicsDirectSpaceState3D::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 = Vector3();
res_shape = shape_idx;
res_obj = col_obj;