diff options
Diffstat (limited to 'scene/3d/skeleton_3d.cpp')
-rw-r--r-- | scene/3d/skeleton_3d.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 7c9fbd3b6d..b5263add48 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -1140,7 +1140,8 @@ void Skeleton3D::set_animate_physical_bones(bool p_enabled) { if (!sim) { return; } - sim->set_active(p_enabled); + animate_physical_bones = p_enabled; + sim->set_active(animate_physical_bones || sim->is_simulating_physics()); } bool Skeleton3D::get_animate_physical_bones() const { @@ -1148,7 +1149,7 @@ bool Skeleton3D::get_animate_physical_bones() const { if (!sim) { return false; } - return sim->is_active(); + return animate_physical_bones; } void Skeleton3D::physical_bones_stop_simulation() { @@ -1157,7 +1158,7 @@ void Skeleton3D::physical_bones_stop_simulation() { return; } sim->physical_bones_stop_simulation(); - sim->set_active(false); + sim->set_active(animate_physical_bones || sim->is_simulating_physics()); } void Skeleton3D::physical_bones_start_simulation_on(const TypedArray<StringName> &p_bones) { |