How do you get the hinge joint working on all Axis?
Hello, I am trying to figure out how to make my ground be able to tilt(move) on all of the axis. A great example would be this video.
https://www.youtube.com/watch?v=wKgKSg0Nr6A
Currently I have a hinge joint connected to my ground(platform) and It is only working on 1 axis and I was wondering if anybody knows how to make it work on all of the axis?
Answer by SuperRaed · Aug 25, 2015 at 08:42 PM
you want it to tilt on all of the axis not in same time I hope. anyways I briefly tried it and what worked for me is to access the axis attribute from the HingeJoint component and simply assign a new Vector 3 to to
void OnMouseDown(){//this changes axis from x axis to y axis
new_axis = new Vector3 (0f, 1f, 0f);
//GetComponent<HingeJoint> ().anchor = new_anchor;
GetComponent<HingeJoint> ().axis = new_axis;
}
Answer by jeffreyyourman · Aug 26, 2015 at 03:11 AM
I actually used the configurable joint and it's working perfectly! Thank you! But I just have one question. I had gameobjects that I had set to 0.5 (y-axis) above the platform and when i start to tilt it some of the gameobjects go below the platform due to the tilt. I was wondering if you knew how to strictly connect the gameobjects to the platform?
Thanks again for your help!!
Answer by 280491 · Dec 14, 2015 at 10:39 AM
Hi
I'm trying to do something very similar, I want the object to be able to rotate on all axes but have a joint to another axis (to represent shoulder ball and socket movement in 3d). Did the configurable joint work for this?
Your answer
Follow this Question
Related Questions
HingeJoint.angle with connected body 0 Answers
Same object, different scale on different projects both with default project settings 0 Answers
How to make a puch to open door 2D 0 Answers
Wheelchair movement with hinge joint and rotation of controllers? 0 Answers
How do I make a Hinge joint move slowly? 2 Answers