You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
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:
@@ -158,7 +158,7 @@ bool GodotPhysicsDirectSpaceState2D::intersect_ray(const RayParameters &p_parame
|
|||||||
if (p_parameters.hit_from_inside) {
|
if (p_parameters.hit_from_inside) {
|
||||||
// Hit shape at starting point.
|
// Hit shape at starting point.
|
||||||
min_d = 0;
|
min_d = 0;
|
||||||
res_point = local_from;
|
res_point = begin;
|
||||||
res_normal = Vector2();
|
res_normal = Vector2();
|
||||||
res_shape = shape_idx;
|
res_shape = shape_idx;
|
||||||
res_obj = col_obj;
|
res_obj = col_obj;
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ bool GodotPhysicsDirectSpaceState3D::intersect_ray(const RayParameters &p_parame
|
|||||||
if (p_parameters.hit_from_inside) {
|
if (p_parameters.hit_from_inside) {
|
||||||
// Hit shape at starting point.
|
// Hit shape at starting point.
|
||||||
min_d = 0;
|
min_d = 0;
|
||||||
res_point = local_from;
|
res_point = begin;
|
||||||
res_normal = Vector3();
|
res_normal = Vector3();
|
||||||
res_shape = shape_idx;
|
res_shape = shape_idx;
|
||||||
res_obj = col_obj;
|
res_obj = col_obj;
|
||||||
|
|||||||
Reference in New Issue
Block a user