You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Fix for issue #2117
This commit is contained in:
@@ -113,6 +113,7 @@ bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const
|
||||
return false;
|
||||
|
||||
Transform gt = node->get_global_transform();
|
||||
Transform gi = gt.affine_inverse();
|
||||
float depth = node->get_depth()*0.5;
|
||||
Vector3 n = gt.basis.get_axis(2).normalized();
|
||||
Plane p(gt.origin+n*depth,n);
|
||||
@@ -135,6 +136,8 @@ bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const
|
||||
if (!p.intersects_ray(ray_from,ray_dir,&spoint))
|
||||
break;
|
||||
|
||||
spoint = gi.xform(spoint);
|
||||
|
||||
Vector2 cpoint(spoint.x,spoint.y);
|
||||
|
||||
cpoint=CanvasItemEditor::get_singleton()->snap_point(cpoint);
|
||||
@@ -349,6 +352,8 @@ bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const
|
||||
if (!p.intersects_ray(ray_from,ray_dir,&spoint))
|
||||
break;
|
||||
|
||||
spoint = gi.xform(spoint);
|
||||
|
||||
Vector2 cpoint(spoint.x,spoint.y);
|
||||
|
||||
cpoint=CanvasItemEditor::get_singleton()->snap_point(cpoint);
|
||||
|
||||
Reference in New Issue
Block a user