Windows Break joints by force

Cyranh

Member
Hello!

So I've created a top down game where you can make your own machine out of several objects and ride it around. Now the problem is, that when I ride into the wall very fast, all the parts move around and the whole machine deforms. (Here's an image to illustrate what I mean: http://imgur.com/eHRIYcf)

I have two questions:
-How do I prevent the parts completely from moving individually from each other.
-How do I make my joints break when objects move too far away from each other.

I've used either
physics_joint_revolute_create(id, Part, x, y, 0, 0, 0, 0, 0, 0, false);
or
physics_joint_weld_create(id, Part, x, y, 0, 0, 0, false);
to attach the parts

Thanks in advance!
If my question is unclear, please let me know and I'll try to elaborate.
 

Xor

@XorDev
I haven't messed with GM physics in a while so I may be a little rusty, but couldn't you just link all the fixtures together when you created it. Just use the same object with each fixture linked to it. You have to make the fixtures in code for this to work though (rather than using the object collision shapes).
Let me know if this works or if you have questions.
 
Top