hi all.i've a question: i've a truck in my scene,i've created script form move it. now i want to make possibility of attach or detach trailer. what is correct way?
Attachment... First align your trailer to the hitch point. Second create a customized joint that handles rotation in the Y axis from -120 to 120 degrees, X and Z axis are both -10 to 10. Set the breakpoint to about 10 times the weight of the trailer. (I think it may be more) Set the rigid bodies. Detachment... Destroy the joint I posted the exact joint you need in a previous thread. It assumes that the trailer is going the same direction as the truck, you would have to do some angle calculation to fix it. (I have gotten better at Unity since then... lol ) http://forum.unity3d.com/threads/68742-truck-making-tutorial.?p=439426&viewfull=1#post439426
yeah, there was a bunch more to it, but basically it goes on a trailer and references the fifth wheel point. Probably more, but I can't remember..