- Home /
There is no ConfigurableJoint2D / How to make a character climb ledges in 2D
I'm converting the 2D game I'm working on from 3D physics to use Unity's new 2D physics stuff and I can't find any 2D equivalent for ConfigurableJoint, which I was using for ledge climbing.
This is how I had it set up:
Player hangs on a ledge by way of a ConfigurableJoint that prevents all movement (and is linked to the rigidbody of the ledge for moving platforms).
Player presses a button to climb up, which starts an animation.
The climb animation moves the model as if the object were stationary, meaning that when the animation ends, the model is a short distance up and forwards from its anchor point.
My script tracks this movement caused by the animation, snaps the model back to its usual anchor point (in LateUpdate) and then applies the movement to the vertical and horizontal motors of the ConfigurableJoint.
The result is that the model moves and climbs up exactly how it was animated and the player's collider moves up with it.
So my questions are:
Can anyone think of a way to simulate this behaviour with the 2D joints?
Or even better, can anyone think of a better way to do ledge climbing using the 2D physics system?
Your answer
Follow this Question
Related Questions
Problem with joints 2 Answers
2d crane physics hinge joint 2d 0 Answers
Wheel Friction Curve in 2d 0 Answers