11.7 C
New York
Thursday, November 27, 2025

physics – Lively ragdoll in Godot 4.5: methods to obtain good outcomes?


I am engaged on a 2.5D recreation in Godot 4.5 that makes use of skeletal animation + ragdoll physics.
I am actually pleased with how the full ragdoll mode behaves, however I am unable to get something near an excellent energetic ragdoll consequence.

I am utilizing PhysicalBoneSimulator3D and mixing between animation – physics – animation by adjusting the affect property.

Has anybody achieved a pleasant energetic ragdoll setup in Godot 4.x?

Right here’s the simplified model of my present code:

func _on_hurtbox_body_entered(physique: Node3D):
  activate_ragdoll()

  var tween = create_tween()
  tween.tween_interval(0.25)
  tween.tween_property(physical_bone_simulator, "affect", 0.0, 0.5)
    .set_ease(Tween.EASE_OUT)
  tween.tween_callback(Callable(self, "deactivate_ragdoll"))


func activate_ragdoll(affect: float):
  animation_tree.energetic = false
  collider.set_deferred("disabled", true)
  physical_bone_simulator.physical_bones_start_simulation()
  physical_bone_simulator.affect = 0.8


func deactivate_ragdoll():
  physical_bone_simulator.affect = 0.0
  physical_bone_simulator.physical_bones_stop_simulation()
  collider.set_deferred("disabled", false)
  animation_tree.energetic = true

Full Ragdoll

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles