summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRaphaelHunter <Raphael10241024@gmail.com>2019-08-15 19:34:47 +0800
committerRaphaelHunter <Raphael10241024@gmail.com>2019-08-22 20:30:03 +0800
commit74713fe970716818b643f7043b655129943624f3 (patch)
tree35f3992af1eed3fe4d55faa4c6eaec90ad3b1965 /scene
parent7978e9071b9b2e5056a6a4ef2ece44d7ea00b4fb (diff)
Fix custom inertia in physics2d, closes#30838
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/physics_body_2d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 49da709a47..0d9df3dae9 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -594,7 +594,7 @@ real_t RigidBody2D::get_mass() const {
void RigidBody2D::set_inertia(real_t p_inertia) {
- ERR_FAIL_COND(p_inertia <= 0);
+ ERR_FAIL_COND(p_inertia < 0);
Physics2DServer::get_singleton()->body_set_param(get_rid(), Physics2DServer::BODY_PARAM_INERTIA, p_inertia);
}