Page 1 of 1

Can't get elasticity to work

Posted: Sun Nov 02, 2008 9:11 pm
by mildm8nnered
I've got code that is essentially identical to the moon buggy example.

I've hacked it, so the vehicle is just a circle.

I've set the elasticity on the static body, and the circle to 1.0, but I don't seem to get any bounce at all.

Is there something more to elasticity than merely setting it on the shapes?

Re: Can't get elasticity to work

Posted: Wed Nov 05, 2008 8:58 pm
by mildm8nnered
Still no luck with bouncing ... any suggestions would be great.

cheers,
m.

Re: Can't get elasticity to work

Posted: Wed Nov 05, 2008 10:21 pm
by maximile
In certain versions of Chipmunk the elastic iterations value defaults to zero. You'll need to set it to something higher (try 5-10). In C I think it's space->elasticIterations

Re: Can't get elasticity to work

Posted: Thu Nov 06, 2008 1:53 pm
by mildm8nnered
Thanks - that did the trick!