Formula / class for creating a rope for 2D side scroller

Started by
1 comment, last by DividedByZero 10 years, 8 months ago

Hi Guys,

Does anyone know of a formula / class for creating a rope for 2D side scroller.

Ideally I would like to create something like the rope used in Limbo, where it reacts to physics etc.

Any help would be awesome. :)

Advertisement

Well the formula would be

Force = mass * acceleration

or

F = ma

;)

You can model a rope as a series of point masses constrained by fixed distances between them. You'd probably be better checking out a physics library though. They used Box2D for angry birds, that should be good for a 2d game, http://en.wikipedia.org/wiki/Box2D

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

Thanks man! I'll check out Box2D :)

This topic is closed to new replies.

Advertisement