Multiple Springs?

Discuss any Chipmunk bugs here.
Post Reply
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Multiple Springs?

Post by maximile »

Is it possible to apply more than one cpDampedSpring to a body? I just tried and failed (only the last one to be applied seems to have any effect). The docs didn't mention this, so I wasn't sure if it was a bug in my code, a bug in Chipmunk or just not implemented. Do I need to combine them manually somehow?

Thanks.
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Oops

Post by maximile »

I'm lying in bed now, so I can't check the code, but I've just realised that I'm probably resetting the forces before each call. Which I'm sure would cause this problem, so I'll fix that tomorrow and hopefully that'll work. I hope no one has wasted any time thinking about this.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Multiple Springs?

Post by slembcke »

Yeah, it should work. I didn't really get a chance to look at it this weekend. (too much sailing and getting sunburned)

The only potential problem is that the damping as applied outside of the solver won't be 100% correct, so it could act funny if you are applying multiple springs with high damping values.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Re: Multiple Springs?

Post by maximile »

lucas
Posts: 54
Joined: Wed Sep 26, 2007 2:34 am
Contact:

Re: Multiple Springs?

Post by lucas »

WOW!!
That is really, really cool.
Tangame - a tangram puzzle game with physics.
http://code.google.com/p/tangame/
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests