diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-22 15:41:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-22 15:41:35 +0200 |
commit | bff0458bcc2a45dbde3e16768a4ec1e040c0f3d7 (patch) | |
tree | da2bc39698b3baf5b982e0e44c35b069abfca60e /scene | |
parent | 7d9ae522b4ad2c98679dbc34bbb0623137359d5b (diff) | |
parent | 74713fe970716818b643f7043b655129943624f3 (diff) |
Merge pull request #31386 from raphael10241024/fix_inertia
Fix custom inertia in physics2d
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); } |