Amit
Amit

Reputation: 219

Chipmunk body collision with wall is rebounding normal to the wall

I am developing a top down board game using chipmunkJS. I have a circle body (carom board striker) having following parameters

radius → 30 Density → 2 friction → 0.6 elasticity → 0.6

circle also having a positive moment of inertia.

and a carom wall with parameters

friction - 0.6 elasticity → 0.9

the space damping is 0.6.

When the circle hits the wall it properly rebounds.Since the circle having moment of inertia it internally rotates during its motion. To turn of angular rotation, I created the circle with infinite moment of inertia. But unfortunately when circle with infinite moment of inertia hits the wall it returns with an angle which is normal to the wall, regardless of the hitting angle. What will be the possible reasons. Is there anything i should try with friction, elasticity, or any other physical parameters. Can someone suggest some methods to completely turn off the rotation effects over the circle (something like yourBodyDef.preventRotation = true that can be set in box2d).

Thanks for reply.

Upvotes: 1

Views: 151

Answers (0)

Related Questions