Topic was automatically imported from the old Question2Answer platform.
Asked By
mohsen.ph.69
Old Version
Published before Godot 3 was released.
Hi I have 2 question First
I need that my character to be kinematicbody2D then when my character die I need it to become a rigidbody2D connected with joint! Is that possible? Second
Also when I connect them with joint is there any way to constraint the two rigidBody to only have certain degree, For example I want to knee bend only backward, Is That possible
First:
I had a similar issue, and my solution is not perfect at all, so I’m also curious :).
I used KinematicBody2D (name: “player”) as character controller, and I replaced it (runtime with gdscript: remove_child → add_child) with the joined RigidBody2Ds (name: “corpse”) when the player died.
Second:
Add a collision polygon (draw it properly!) to the rigidbodies, and uncheck the (pin)joint’s exclude nodes checkbox!
Here is my result:
There are many difficulties (ie: initializing the “corpse” rigidbody parts according to the player’s last status),
and strange behaviors especially if you override the default gravity… so it is not so easy.