Static objects - Energy black holes?

Official forum for the Chipmunk2D Physics Library.
Post Reply
zid
Posts: 4
Joined: Tue Jul 21, 2009 8:21 am
Contact:

Static objects - Energy black holes?

Post by zid »

I've just started toying around with chipmunk, and it seems to me that static bodies are energy black holes?

I can't get my ball to bounce off one, I made a static body line at the base of the screen, and a ball with a small mass.

The ball starts with a velocity vector pointing straight downwards. All elements in the system are frictionless, and there is no gravity.

The ball hits the floor, and sticks like glue.

Is the energy going into the static body almost entirely because of the INFINITY mass given to it?

Is there a good way to handle such a situation?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Static objects - Energy black holes?

Post by slembcke »

Have you enabled elasticity by setting the shape.e property of the two shapes involved? The final elasticity is calculated by multiplying the elasticity of the two objects that collide. In Chipmunk 4.x I also made somewhat of a silly mistake of disabling elastic iterations by default and not leaving a fallback. So if you are using that version, you will also have to set space.elasticIterations to something non-zero.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
zid
Posts: 4
Joined: Tue Jul 21, 2009 8:21 am
Contact:

Re: Static objects - Energy black holes?

Post by zid »

slembcke wrote:Have you enabled elasticity by setting the shape.e property of the two shapes involved? The final elasticity is calculated by multiplying the elasticity of the two objects that collide. In Chipmunk 4.x I also made somewhat of a silly mistake of disabling elastic iterations by default and not leaving a fallback. So if you are using that version, you will also have to set space.elasticIterations to something non-zero.
Ah, thanks very much, elasticIterations was it, I tried CVS first but it wouldn't build.
Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests