- Home /
Using hinge joints to make a balance board
I'm trying to make a first-person balance board game where the player has to keep the board level as long as he can before falling off. In order to accomplish this, the player has to remove balls that fall onto the board to keep it from teetering off to the side. Once all the balls are off the platform, the board should return to its normal rotation(i.e. level).
Currently, I'm using a hinge point on the board to keep its position in space locked. The board is just floating in space at the moment; it's not connected to anything. Unfortunately, I'm having trouble bringing the board back to its level rotation. I've looked at the reference page for HingeJoints, but the terminology is still confusing to me. Any pointers on how to bring an object to its initial position would be greatly appreciated.
Answer by Rxanadu · Aug 10, 2013 at 06:24 PM
I think I answered my own question!
After messing around with fixed and hinge joints I came upon this discovery: In order to create a balancing board that returns back to its original position, you need both a fixed joint and at least one hinge joint component for the board that connects to the fixed joint.
Ensure the fixed joint is just below the center of the balance board to act as a "pole" to balance the board on. Then connect the hinge joint to the fixed joint (via the "Connected Body" selection of the Hinge Joint component in the Inspector).
Don't worry about setting the "Use Gravity" option for the rigidbodies on or off; the fixed and hinge joints appear to lock the objects in place. I'm not so sure about this, though. Please feel free to correct me on that "feature" of fixed and hinge joints.
Your answer
Follow this Question
Related Questions
A position locked hinge joint with drag and no gravity? 1 Answer
Rigidbodies acting silly. 1 Answer
Hinge Joint Breaks When LocalScale is Changed 3 Answers
Rigidbody Problem - Scrolling elements 0 Answers