Elastic properties of an object

Hello everyone,

I am developing a game in which i am using a rope image. I want this rope to have elastic property as i wanted to throw the object with elastic strength of rope.

So how can i code it?

Please reply me fast as i have deadline to complete the game.

Thanks & Regards
Varun [import]uid: 130269 topic_id: 22940 reply_id: 322940[/import]

What about this:

http://developer.anscamobile.com/code/rope-demo

[import]uid: 50459 topic_id: 22940 reply_id: 91699[/import]

hi rmbsoft

Thanks for your reply but i wanted the elstic object through which i can throw object. as in we do in sling shot. [import]uid: 130269 topic_id: 22940 reply_id: 92308[/import]

Is this “rope” like a full “flexing” rope, which can curve, loop, and stretch? Or is it more like a single “line” rope which can be “stretched” with elasticity in a *straight* line?

Joints might serve your purpose if it’s just a “line” type of rope. “Distance” joints have an elastic parameter in Box2D, and “touch” joints too.

If you need to construct something like a multi-segment bending, stretching rope, then it’s really complicated and not a great simulation to real life (believe me, I’ve tried, for hours). If this IS your need, then I can only suggest you try to construct a rope with every “segment” joined by a distance joint (each with some elasticity)… don’t use “pivot” joints. And then in the end, you’ll probably tear your hair out because it won’t behave like you want it to. Consider yourself warned. :slight_smile:

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 22940 reply_id: 92317[/import]