diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-02-20 00:37:49 -0600 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-02-20 00:37:49 -0600 |
commit | 9f048f4c4db460fe810d751da056f34284ce465d (patch) | |
tree | e4bab9dd5bf0bdf8ccc6f125bc19bc42a0dfa012 /scene/resources/sphere_shape_3d.cpp | |
parent | 499eec13a3660f6f05a6212be97ea164fd98b519 (diff) |
Show an error when setting a negative size on a collision shape
Diffstat (limited to 'scene/resources/sphere_shape_3d.cpp')
-rw-r--r-- | scene/resources/sphere_shape_3d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/sphere_shape_3d.cpp b/scene/resources/sphere_shape_3d.cpp index ee789362c9..8282992401 100644 --- a/scene/resources/sphere_shape_3d.cpp +++ b/scene/resources/sphere_shape_3d.cpp @@ -63,6 +63,7 @@ void SphereShape3D::_update_shape() { } void SphereShape3D::set_radius(float p_radius) { + ERR_FAIL_COND_MSG(p_radius < 0, "SphereShape3D radius cannot be negative."); radius = p_radius; _update_shape(); notify_change_to_owners(); |