How create a rope in chipmunk?

Official forum for the Chipmunk2D Physics Library.
Post Reply
MetalSoul
Posts: 2
Joined: Tue Jul 30, 2013 7:08 pm
Contact:

How create a rope in chipmunk?

Post by MetalSoul »

Hello

I am new to chipmunk, and i want learn more about

I think chipmunk will be the physics engine for my game

Now , i want know, how i can create rope ( smooth rope )
Any simple code? For iphone dev and cocos2d

I tried find in google but there nothing about chipmunk,, why

You guys should create tutorials for us, thats will let any one can understand and buy pro version

Thats all and thanks in advance
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: How create a rope in chipmunk?

Post by slembcke »

We have a number of tutorials on the website here: http://chipmunk-physics.net/documentation.php

We don't have one specifically for rope and Cocos2D, but it's not difficult to do. You just need to attach a bunch of small bodies together with joints. The harder part is drawing nice ropes, which depends heavily on what sprite engine you want to use.

Since Chipmunk is a rigid body physics library, it's not idea for rope simulation. You could make more stable looking, and higher performance rope using vertlet integration and simple distance constraints. Read this paper by Thomas Jakobsen for more info: http://www.pagines.ma1.upc.edu/~susin/f ... hysics.pdf It's quite simple to implement.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
MetalSoul
Posts: 2
Joined: Tue Jul 30, 2013 7:08 pm
Contact:

Re: How create a rope in chipmunk?

Post by MetalSoul »

Ahh, for now i don't need that maybe in future

Thanks for support
yomanx
Posts: 7
Joined: Fri Dec 19, 2014 6:17 pm
Contact:

Re: How create a rope in chipmunk?

Post by yomanx »

Hi to all,

I did it "You just need to attach a bunch of small bodies together with joints."

But when it collision with objects, the joint stretch, how can i fix it?

i used sPivotJoint
sortris
Posts: 4
Joined: Mon Oct 21, 2013 8:34 am
Contact:

Re: How create a rope in chipmunk?

Post by sortris »

Maybe make the bodies sensonrs?
body.setSensor(true)
After then they won't collide with other objects.
yomanx
Posts: 7
Joined: Fri Dec 19, 2014 6:17 pm
Contact:

Re: How create a rope in chipmunk?

Post by yomanx »

yeah, some little better then nothing..
Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests