diff options
author | RaphaelHunter <Raphael10241024@gmail.com> | 2019-08-15 19:34:47 +0800 |
---|---|---|
committer | RaphaelHunter <Raphael10241024@gmail.com> | 2019-08-22 20:30:03 +0800 |
commit | 74713fe970716818b643f7043b655129943624f3 (patch) | |
tree | 35f3992af1eed3fe4d55faa4c6eaec90ad3b1965 /scene | |
parent | 7978e9071b9b2e5056a6a4ef2ece44d7ea00b4fb (diff) |
Fix custom inertia in physics2d, closes#30838
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 2 |
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); } |