diff options
| author | Rémi Verschelde | 2017-08-16 17:17:56 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-16 17:17:56 +0200 |
| commit | b1ecaaa22b8dd87a75db414cb84ad0f60d5d4cef (patch) | |
| tree | f02f5dac7b5a1c0e35c2290513b62f4873b81a93 /editor/plugins/spatial_editor_plugin.cpp | |
| parent | ae78a13f59c5a4025d078084afae2737cf0d1454 (diff) | |
| parent | 428f03cf06d3841b2a593f46aa42912ef5c82f3c (diff) | |
| download | godot-b1ecaaa22b8dd87a75db414cb84ad0f60d5d4cef.tar.gz godot-b1ecaaa22b8dd87a75db414cb84ad0f60d5d4cef.tar.zst godot-b1ecaaa22b8dd87a75db414cb84ad0f60d5d4cef.zip | |
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 6a8ba0b67..5faacf7a6 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -414,7 +414,7 @@ void SpatialEditorViewport::_find_items_at_pos(const Point2 &p_pos, bool &r_incl results.sort(); } -Vector3 SpatialEditorViewport::_get_screen_to_space(const Vector3 &p_pos) { +Vector3 SpatialEditorViewport::_get_screen_to_space(const Vector3 &p_vector3) { CameraMatrix cm; cm.set_perspective(get_fov(), get_size().aspect(), get_znear(), get_zfar()); @@ -427,7 +427,7 @@ Vector3 SpatialEditorViewport::_get_screen_to_space(const Vector3 &p_pos) { camera_transform.basis.rotate(Vector3(0, 1, 0), -cursor.y_rot); camera_transform.translate(0, 0, cursor.distance); - return camera_transform.xform(Vector3(((p_pos.x / get_size().width) * 2.0 - 1.0) * screen_w, ((1.0 - (p_pos.y / get_size().height)) * 2.0 - 1.0) * screen_h, -get_znear())); + return camera_transform.xform(Vector3(((p_vector3.x / get_size().width) * 2.0 - 1.0) * screen_w, ((1.0 - (p_vector3.y / get_size().height)) * 2.0 - 1.0) * screen_h, -get_znear())); } void SpatialEditorViewport::_select_region() { |
