diff options
Diffstat (limited to 'scene/3d/camera.cpp')
-rw-r--r-- | scene/3d/camera.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 9db7253fd6..02a7845e0b 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -339,15 +339,8 @@ Vector3 Camera::project_local_ray_normal(const Point2 &p_pos) const { ERR_FAIL_COND_V(!is_inside_tree(), Vector3()); } -#if 0 - Size2 viewport_size = get_viewport()->get_visible_rect().size; - Vector2 cpos = p_pos; -#else - Size2 viewport_size = get_viewport()->get_camera_rect_size(); Vector2 cpos = get_viewport()->get_camera_coords(p_pos); -#endif - Vector3 ray; if (mode == PROJECTION_ORTHOGONAL) { @@ -371,17 +364,9 @@ Vector3 Camera::project_ray_origin(const Point2 &p_pos) const { ERR_FAIL_COND_V(!is_inside_tree(), Vector3()); } -#if 0 - Size2 viewport_size = get_viewport()->get_visible_rect().size; - Vector2 cpos = p_pos; -#else - Size2 viewport_size = get_viewport()->get_camera_rect_size(); Vector2 cpos = get_viewport()->get_camera_coords(p_pos); -#endif - ERR_FAIL_COND_V(viewport_size.y == 0, Vector3()); - //float aspect = viewport_size.x / viewport_size.y; if (mode == PROJECTION_PERSPECTIVE) { |