- Home /
Constraining an object's movement using two spring joints on its children
I have a game mechanic that requires a player to be connected to two separate objects via spring joints. As Unity only allows one spring joint per object I'm assuming that I need to apply each spring to child objects. How do I go about transferring the forces upwards to the parent object?
Answer by Owen-Reynolds · Aug 17, 2013 at 03:07 PM
Transfer of forces back and forth between both objects is automatic. What you're suggesting (two fixed end points with springs connected to the player) works fine.
One gameObject needs to have the spring as a component just as a technical matter, since Springs are currently components. That also allows you to adjust the connection point on that object (I think it connects to the other one at the nearest point, from the starting position.)
In theory, it seems a spring could be a gameObject with two slots for connected objects. But that would encourage people to make overly-complex chains that would break physics
Your answer
Follow this Question
Related Questions
iOS Children's Game: Closing and relaunching again allows user to access the App Store 0 Answers
Make a simple tree 1 Answer
Is it possible to prevent parent rigidbody physics from effecting children rigidbodies? 1 Answer
Deactivate Specific Children In Partent 1 Answer
Create multiple instances of an object 2 Answers