Skip to content

Commit

Permalink
Merge pull request #54270 from JFonS/fix_selection
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Oct 26, 2021
2 parents 8473062 + 83fd0e0 commit 8c162f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos) {
RS::get_singleton()->sdfgi_set_debug_probe_select(pos, ray);
}

Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world_3d()->get_scenario());
Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario());
Set<Ref<EditorNode3DGizmo>> found_gizmos;

Node *edited_scene = get_tree()->get_edited_scene_root();
Expand Down Expand Up @@ -552,7 +552,7 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, Vector<_RayRe
Vector3 ray = _get_ray(p_pos);
Vector3 pos = _get_ray_pos(p_pos);

Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world_3d()->get_scenario());
Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario());
Set<Node3D *> found_nodes;

for (int i = 0; i < instances.size(); i++) {
Expand Down

0 comments on commit 8c162f4

Please sign in to comment.