From 6c557b8bdfc0f9b9080fa40b72c891bbca11679f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 10 Nov 2019 00:12:18 +0100 Subject: Camera: Don't set default value for project_position A z_depth of 0 returns the camera position, which is not really useful. This also makes the API breakage from 3.1 clearer as 3.1 code will now fail to compile, so users will have to adapt and use the new parameter. For the reference, in 3.1, the z_depth was hardcoded to the near plane. Closes #33493. --- scene/3d/camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/3d/camera.cpp') diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 9797b5f3ab..4d9bb69778 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -486,7 +486,7 @@ void Camera::_bind_methods() { ClassDB::bind_method(D_METHOD("project_ray_origin", "screen_point"), &Camera::project_ray_origin); ClassDB::bind_method(D_METHOD("unproject_position", "world_point"), &Camera::unproject_position); ClassDB::bind_method(D_METHOD("is_position_behind", "world_point"), &Camera::is_position_behind); - ClassDB::bind_method(D_METHOD("project_position", "screen_point", "z_depth"), &Camera::project_position, DEFVAL(0)); + ClassDB::bind_method(D_METHOD("project_position", "screen_point", "z_depth"), &Camera::project_position); ClassDB::bind_method(D_METHOD("set_perspective", "fov", "z_near", "z_far"), &Camera::set_perspective); ClassDB::bind_method(D_METHOD("set_orthogonal", "size", "z_near", "z_far"), &Camera::set_orthogonal); ClassDB::bind_method(D_METHOD("set_frustum", "size", "offset", "z_near", "z_far"), &Camera::set_frustum); -- cgit v1.2.3