Hi,
How do i add two hingejoints to one object using scriptingand connect both of them to one object but with different anchor point. I want to pull one object with another using hinge. I am using the DragRigidbody script to do so. I can do it through the Unity editor but not through scripting. Need a little help here please.
Thanks.
Is there no one who can help me…
You can add a hinge or any other component to a GameObject using the GameObject.AddComponent function. Once the joint is added, you can change its settings from the script as usual. Are you using two hinge joints to fix the two objects together rigidly? If so, you will probably find it easier to use a fixed joint.
Hi Andee, Fixed joint wont help me cause even if i set break force to infinity the joint gets broken if i move the objects very fast using the dragrigidbody script. Also i have tried that. With hinge joint i have achieved the desired effect but what i cant do is add, refer or destroy joints through scripting. I have made another thread with the code i am trying and the problem. It would be great if u can help me wit hingejoint.
Here is the link
http://forum.unity3d.com/threads/76361-Referencing-hingejoint-in-a-script-using-variable-does-not-work?p=488748#post488748
I have one more question. Sorry for being straight forward. Why is that so many posts have 0 replies. My last three posts has no replies and i was stuck on my own to figure it out.