Chain with physics?
GreenfroggGames
Member Posts: 224
I've made chain parts with custom collisions similar to @Socks Ball and chain demo. I put acceleration downwards on the chain parts and collide with "actor 1". So the chain falls down but when it collides with "actor 1" it breaks to pieces. I want it to stay intact, any help is much appreciated:)
Comments
GameSalad uses the Box2D physics engine. They need to incorporate the joint system that already resides in Box2D.
Ok, was hoping it could be done with custom collisions...
It actually can be done without custom collisions. But it requires you to use a series of change and constrain attributes within each 'chained' actor.
Essentially you need to recreate (using a series of constrain attribute behaviors within each actor) the Box2D joint system.
From my perspective, there are two major challenges to rolling your own joint system within GameSalad:
1) Basically, you would need to know how to code a joint system/physics engine within GameSalad. (Someone with a B.S. in Computer science with an emphasis in physical simulations could do this.)
2) The number of constrain attribute behaviors for each actor adds up quickly when multiplied across actors. Anything beyond 5 actors really begins to bog the entire 'simulation' down.
This is all really a shame, because GS already uses Box2D which has the joint system already available. Imagine how useful this would be to the education sector if GS made the Box2D physics engine more readily available to its subscribers. It would be open to a whole new group of "physical computing" educators at the Jr. and Sr. high school level!
I'm screwed then Guess my only option is to try another engine, any suggestions?
I would not say you are 'screwed' in the least! There are often many work-arounds that are perfectly useable. (Such as Socks' ball and chain demo.)
It really depends on what you are doing.
For example, perhaps the Socks' approach might still work for you. But you might need to use something besides a collision behavior. Or perhaps you just need to tweak some of the physics parameters until the collision isn't so overwhelming.
Or perhaps, you can incorporate a test for when the chain explodes, and you can just reset everything back to its proper position using a couple change attribute behaviors.
GameSalad is extremely flexible! Time to get creative!
Thanks for all your advice @RThurman I'll see what I can do
Thats the spirit!