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.
Multiple Springs?
-
- Posts: 157
- Joined: Mon Aug 20, 2007 12:53 pm
- Location: London, UK
- Contact:
-
- Posts: 157
- Joined: Mon Aug 20, 2007 12:53 pm
- Location: London, UK
- Contact:
Oops
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.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Multiple Springs?
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.
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/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 157
- Joined: Mon Aug 20, 2007 12:53 pm
- Location: London, UK
- Contact:
Re: Multiple Springs?
It works very well now: http://www.maximile.net/stuff/springyh3.mov
-
- Posts: 54
- Joined: Wed Sep 26, 2007 2:34 am
- Contact:
Re: Multiple Springs?
WOW!!
That is really, really cool.
That is really, really cool.
Tangame - a tangram puzzle game with physics.
http://code.google.com/p/tangame/
http://code.google.com/p/tangame/
Who is online
Users browsing this forum: No registered users and 6 guests