Vibrating blocks

I am working on an open source game using the Panda3D engine. I have ran into a problem that I can’t seem to solve. Me and my team seem to have the Panda3D physics engine working, however, we are running into a problem where the blocks that are stacked on each other are “vibrating”.

You can see an example in this youtube video - youtube.com/watch?v=pbYr1PRCtRY

You can view all of our code in this subversion repository - bacon-vs-eggs.googlecode.com/svn/

(To run the game just click on run.bat or ppython main.py - assuming you have Panda3D setup)

One person suggested that the blocks are really just bouncing off of each other and we need to use friction to stop this.

Thoughts?

in case of bouncing you may want to add more dampening instead of friction.

What do you mean by “dampening”? Could you provide an example?

dont have a code example. but damping is a material setting most physic engines allow you to set. it basically absorb some of the impact energy so it bounces off less.

I’m not sure that dampening is the issue here. Panda’s physics engine doesn’t actually implement bouncing, so it doesn’t provide a dampening control either.

If you’re seeing bouncing, it means something is being miscalculated, and overcompensating. I’ve seen this problem happen when there are scales involved. Have you tried flattening all of the scales down into the vertices?

I’ve also occasionally seen this happen when the CollisionBox is used as an into solid instead of the equivalent six CollisionPolygons. (The CollisionBox isn’t terribly well implemented, frankly.) If flattening the scales down doesn’t solve the problem, you could try not using CollisionBox to see if that helps.

David