I really wish GameSalad had Box2D joints. (Assuming they still use Box2D as the underlying physics engine.) But they haven't implemented them ... yet.
But joints are really just a definition of the relationship between two objects. When one creates a relationship between two or more objects a joint is created. For example, when you constrain an actors' x and y position to another actor you have created a joint. (And yes, I know, constrain behaviors override the physics engine. But its still a joint.)
If you looked at the Box2D source code, you would find that its just using the same math functions that GameSalad has to define those relationships. Blah, Blah, Blah, math, Blah, Blah.. math, Blah, Blah, math, math, Blah, Blah....
Well any way, here is an example of how to use two simple move behaviors in each actor to create chain joints. It just shows the basic principles. But one could use the same principles to create elastic joints (with acceleration behaviors).
You can drag the end points around and the joints do their chain thing. If you want, you could put obstacles in the scene, just to prove that the chain links can bump into stuff and react to physics.
Its best to think of the actors as the 'joints'. Not as the chain links. You would build the chain links to go between the 'joints'.
Comments
Would love joints in GS - They're to obtrusive and clunky in Corona.
Darren.
But joints are really just a definition of the relationship between two objects. When one creates a relationship between two or more objects a joint is created. For example, when you constrain an actors' x and y position to another actor you have created a joint. (And yes, I know, constrain behaviors override the physics engine. But its still a joint.)
If you looked at the Box2D source code, you would find that its just using the same math functions that GameSalad has to define those relationships. Blah, Blah, Blah, math, Blah, Blah.. math, Blah, Blah, math, math, Blah, Blah....
Well any way, here is an example of how to use two simple move behaviors in each actor to create chain joints. It just shows the basic principles. But one could use the same principles to create elastic joints (with acceleration behaviors).
You can drag the end points around and the joints do their chain thing. If you want, you could put obstacles in the scene, just to prove that the chain links can bump into stuff and react to physics.
Its best to think of the actors as the 'joints'. Not as the chain links. You would build the chain links to go between the 'joints'.
http://www.mediafire.com/download/9vjq4qtil8bgnd1/ChainJointsUsingMove.zip
Ummm.... Merry Christmas?
Darren.
One day...:)
Darren.