diff options
Diffstat (limited to 'servers/physics_2d/body_2d_sw.cpp')
-rw-r--r-- | servers/physics_2d/body_2d_sw.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index 6ba159ca0a..de1dfc9ee7 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -238,6 +238,7 @@ void Body2DSW::set_mode(Physics2DServer::BodyMode p_mode) { _inv_mass = mass > 0 ? (1.0 / mass) : 0; _inv_inertia = inertia > 0 ? (1.0 / inertia) : 0; _set_static(false); + set_active(true); } break; case Physics2DServer::BODY_MODE_CHARACTER: { @@ -245,6 +246,7 @@ void Body2DSW::set_mode(Physics2DServer::BodyMode p_mode) { _inv_mass = mass > 0 ? (1.0 / mass) : 0; _inv_inertia = 0; _set_static(false); + set_active(true); angular_velocity = 0; } break; } @@ -694,7 +696,7 @@ Body2DSW::Body2DSW() : still_time = 0; continuous_cd_mode = Physics2DServer::CCD_MODE_DISABLED; - can_sleep = false; + can_sleep = true; fi_callback = NULL; } |