9.2 C
New York
Thursday, November 27, 2025

physics – Ragdoll energetic in Godot 4.5: obtain good outcomes?


I am engaged on a 2.5D recreation in Godot 4.5 what does he use skeletal animation + ragdoll physics. I’m very proud of how full ragdoll The mode behaves, however I can not get something resembling a great energetic ragdoll outcome.

I’m utilizing PhysicalBoneSimulator3D and mixture between animation – physics – animation by adjusting the affect property.

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

Right here is 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