|
Hello fellow scripters,
I came up with something quite fun with rope physics using verlet integration. Let's have a look shall we?
http://www.roblox.com/Rope-physics-Swinging-spoderman-test-place?id=137727197
|
|
|
That is one of the most amazing places I've been too. However, to prove its relevance to the forum, you may want to go more in-depth on the scripting involved. |
|
|
|
Wow, i'm genuinely impressed, and it works perfectly. It's surprisingly easy to navigate with just these ropes, it controls quite nicely. Not to mention, ROPES! Best implementation I've seen. I could imagine a very interesting game using these. :3
~The alpaca of the acting world. |
|
celestalaJoin Date: 2013-05-22 Post Count: 7061 |
Simply amazing. |
|
|
That is amazing. It doesn't quite allow you to connect multiple people together without glitching, but it is quite smooth. |
|
morashJoin Date: 2010-05-22 Post Count: 5834 |
... That's pretty cool. |
|
|
The problem with connecting multiple people is that they would have to share the same constraint and everyone has them locally, so it would become server-side and very buggy. |
|
|
I enjoy spodering thoroughly. |
|
osedayJoin Date: 2008-08-27 Post Count: 1308 |
It's totally awesome, nice job. |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
*clap^math.huge)* |
|
celestalaJoin Date: 2013-05-22 Post Count: 7061 |
^
What's with the lone parenthesis? |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
That parentheses wasn't supposed to be there. :c
Anyway, fantastic job! |
|
|
This is really awesome, can you give us the basics on how you scripted it? |
|
OreologyJoin Date: 2012-09-15 Post Count: 507 |
I KNEW IT! ITS CLIENT SIDED.
Nice work. |
|
|
Well the basic principle would be this:
Have a straight line of points that store position, velocity and acceleration. Connect them in the right order with a constraint, keeping them a certain distance away from each other. Loop through the constraints in the update loop, solve the constraints and repeat this loop like 5-40 times so it won't stretch.
Google for 'Verlet Integration' for more information. |
|
|
I noticed that when you swing from a certain height, you don't end up at that height again. Where do you think the energy of the swing goes? In Roblox, the only forces acting on the mass are gravity and the tension of the string. Does the stretchiness of the string have anything to do with it?
Also, obligatory:
how do i shot web |
|
|
Yeah, stretchiness has to do with it. Also if the swing isn't perfect, as in it doesn't go in a perfect arc, some of the energy will go to the stretchiness. The air resistance multiplier is 0.997, so that affects it a little bit. |
|
Hyp_nosJoin Date: 2010-07-16 Post Count: 552 |
How'd you make that amazing Game? |
|
|
im ####### to make a spider man game wats the ######## |
|