Reputation: 55
So I want my character to act like a pendulum when he lands on the ground to stabilize himself. (Like this game does it: Basket Random, when a character lands he begins to swing until he comes to a full stop). How can I achieve this kind of pendulum? Im using a Rigidbody on my character, so a Hinge Joint wouldn't work since the hinge is gravity dependent. Unfortunately, I don't have any idea how to implement this so I have no code to show.
So the procedure would look like this:
Player lands on the ground
Player starts swinging
Player swings in the other direction with less momentum
The process repeats itself until the player lost his momentum and stops swinging.
Any help is really appreciated
Upvotes: 0
Views: 39
Reputation: 55
As @Leo Bartkus (Thanks a lot Leo) pointed out I only had to adjust the center of mass below my character. If you don't know how this works, check out this tutorial: Center of mass tutorial
Upvotes: 0