1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-04 19:21:46 +00:00

add failure condition for get_pyramid_shape_rid() when camera3d is not in tree. fixes #53564

This commit is contained in:
Mark Riedesel
2021-10-11 10:16:48 -04:00
parent ceee1abc28
commit 49a4d2bc49

View File

@@ -656,6 +656,7 @@ Vector3 Camera3D::get_doppler_tracked_velocity() const {
}
RID Camera3D::get_pyramid_shape_rid() {
ERR_FAIL_COND_V_MSG(!is_inside_tree(), RID(), "Camera is not inside scene.");
if (pyramid_shape == RID()) {
pyramid_shape_points = get_near_plane_points();
pyramid_shape = PhysicsServer3D::get_singleton()->convex_polygon_shape_create();