|
@@ -298,6 +298,7 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
|
|
|
|
|
|
Vector3 ray = _get_ray(p_pos);
|
|
Vector3 ray = _get_ray(p_pos);
|
|
Vector3 pos = _get_ray_pos(p_pos);
|
|
Vector3 pos = _get_ray_pos(p_pos);
|
|
|
|
+ Vector2 shrinked_pos = p_pos / viewport_container->get_stretch_shrink();
|
|
|
|
|
|
Vector<ObjectID> instances = VisualServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world()->get_scenario());
|
|
Vector<ObjectID> instances = VisualServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world()->get_scenario());
|
|
Set<Ref<EditorSpatialGizmo> > found_gizmos;
|
|
Set<Ref<EditorSpatialGizmo> > found_gizmos;
|
|
@@ -326,7 +327,7 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
|
|
Vector3 normal;
|
|
Vector3 normal;
|
|
|
|
|
|
int handle = -1;
|
|
int handle = -1;
|
|
- bool inters = seg->intersect_ray(camera, p_pos, point, normal, &handle, p_alt_select);
|
|
|
|
|
|
+ bool inters = seg->intersect_ray(camera, shrinked_pos, point, normal, &handle, p_alt_select);
|
|
|
|
|
|
if (!inters)
|
|
if (!inters)
|
|
continue;
|
|
continue;
|