Chain / Rope Mechanics
rainwaterstudios
Member Posts: 198
Hey all,
I'm trying to build a mechanic that is essentially one actor dragging another actor attached by a rope or chain. Has anyone made something like this before, or does anyone have any suggestions for how to build it?
Comments
Here is a quick sample I put together based on a previous version from @Socks. I looked for it using the search function but that is a bit wonky and I couldn't find it so I put this together. It uses custom collision shapes for each piece and the 'link-pin' uses the Pin and Center of Mass to keep it locked in place. You can use the right and left arrow keys on the keyboard to swing the ball. This certainly isn't perfect but it's a starting point at least.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Here is a better example I worked up. In this one the black areas on the images show where the custom collision shapes are and the red dot shows where the Center of Mass and Pin are located. There is also a 'rope bridge' sample included in this one.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Nice work Jamie. Very educational.
Attached is a video on how far I got with it, like everyone else, I ran into the chains breaking. I have a few more ideas on how to make the rope chains stronger.
Best,
GSLearn.com | Templates | Free Demos | Udemy Course
@Twayne2, looks nice! Yeah the chains a definitely breakable, I played with that a little but it seems like there will always be a breaking point from some amount of stress. Something to keep messing with for sure.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I played around with the physics settings, sometimes on individual links, and it definitely feels stronger. It can still be broken with too much force though.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c
@Two.E
Nice work! Try adding a giant (invisible) link directly between the anchor actor and the ball actor. Set It up so that it will prevent the smaller links from stretching to the breaking point. But give it enough play so that the smaller links can still act like .... um.... links.
Cool, thanks!
My problem implementing this though is that it's set up with one end being stationary... I want to be able to drag one actor around and have the other actor attached via the chain... anyone know if that's even possible? Thanks for the input everyone! 👍️
for some reason i haven't seen this before. awesome demo @jamie_c . cheers for sharing.
@bob loblaw you're welcome. I keep meaning to do a real tutorial on this but haven't got around to it yet.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
this is great work! Very fluid
GameSalad Templates and Custom Development at the Official Marketplace: http://gshelper.com
i’d been wondering how to do this from time to time, as i wanted to use something like this in my current project. didn’t realise the solution was this simple.
is it possible to have both ends of the chain be moveable? think of it like swinging around a mace (well a morgenstern to be more precise)
@rainwaterstudios, technically yes I'm sure you could build a morgenstern. But if you actually wanted to use it as a weapon in a game I think the problem would be the chain breaking. If there is too much stress put on it it breaks. I worked with this a little more and have got a pretty 'strong' version working by limiting the speed that the whole thing can move at so the collisions are not so violent (see 'ball and chain' at the link).
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I played with that a little but it seems like there will always be a breaking point from some amount of stress.