Plank problem with BGE

Hi guys, I am new both to Blender and to its forum and I am impressed by the amount of information and goodies on offer; I guess I am just trying to say: good job!

I have a little problem with the planks game exercise (; it consists of a structure made of planks (wood after texturing) and a projectile to demolish it (typically a steel ball). I come from 3DStudio MAX and initially I didn’t see any problem with the exercise.

So far I have created a a simple plank structure (starting with a plank and link duplicating the rest) and given it rigid body properties; then I have created a ground (a resized cube). So far so good; problem is when i place the plank lying on the ground and play the game, the plank is not stable; is as if the ground which is a static object was a soft body or something; so when I build a seven stories structure, it starts vibrating and after a while it tumbles down (I have to admit the effect is spectacular, but not quite what I was aiming at). Can anybody help?

I have tried all the options I can think of (such as radius and the like) but without effect; when I sink the single plank into the ground, it is pushed up as expected; but then it vibrates and after a while finally settles. I have tried both in a windows anf a linux platform with the same effect.

Any ideas, anyone? I am totally at a loss. Thanks in advance guys.

Try this:

a) make sure to use proper bounding box (box for planks).

b) Increase damping and play with form factor.

c) Increase number of physics steps.

A last resort is to suspend physics on the planks until the ball hits them.

I would want to lock location on x ans y axis and rotation on all axis of the planks and let it settle on the z axis before releasing all movements… but I have not found any way of turning those lock on and of at runtime. But a script reseting x and y position and rotation of all planks and setting x and y linear velocity to 0 and all angular velocity to 0 for every first N hundred frames might help.

Hi LaH,

Thanks you for your fast answer; just a doubt, I don’t exactly know what you mean by “increase the number of physics steps”; what you suggest of the script sounds way cool, but slightly out of my range just now (though not for long, I hope).What you suggest of suspending physics sounds really intriguing: I didn’t know that was possible (Blender is like a birthday box); but, how do you go about it? (sorry about being such a newbie!)
A last thought: I wonder how comes the tutorial resolves the scene without any instability, just out of the box (he actually drops damping to 0 and radius to the minimum allowed!).

I’ll go to try some of your tricks. Thanks for all your help.

World tab (in game mode), Physics steps, substeps. That where You turn up the number of physics step.

Great, Thanks. I’ll give it a try.

It depends on how you scaled your objects, if you scaled them in edit mode or in object mode, try scaling it both ways. Turn on physics visualization in the game menu, to make sure they have the correct bounds. Other than that, try increase damping values.

edit: You shouldn’t have to increase the physics steps to fix the problem. However, since this is heavily physics based, it will make your game go smoother, but it’s not the direction solution you’re looking for, for the vibrating blocks. It sounds more like an issue with the bounds. You shouldn’t have to mess with the radius value if it’s bounds are set to box.


Thanks for the feedback.I have only worked in object mode since i haven’t needed any object editing so far: just create plank/link-dup plank. Yeah to me it seems a bounds problem; as I understand it, the radius determine the bounds (right?) and the tutorial explicitly tells to drop the radius to the minimum; the bounds are set to box but I don’t fully understand the function of the bound margin; it is set to .060; do you think messing with the margin could help any?. Sorry about all the questions, but I want to take this opportunity to not only solve the problem, but not having it again.

Thanks again for all your help.

If You have scaled in object mode You should apply scale… if You have linked duplicated… apply scale on one and then clear scale on the other?

If scale is not 1.0, 1.0, 1.0 it known to give trouble in same cases… collisions may be one of these.

But higher physics substeps do often help if You got oscillations - frequency get bigger and therefore amplitude smaller and easier for damping to turn out. When theres a structure with many dynamic objects it makes forces progress and ‘even out’ in the structure faster. Thats my experience at least.

Ok, you are right: I applied scale to the first plank, and then I dup-linked all the rest but I didn’t clear scale; I had forgotten about this step because I don’t fully understand it; is it equivalent to MAX reset scale (to eliminate all scale stack as if it is this size “out-of-the-box”)? concerning the physics sub-steps that seems to help a lot while maintaining all the dumping values to 0; when I embed the plank in the ground it jumps out considerably but it finally drops without any fuzz and- specially- without jitter; I am a bit worried the jump is so high: something must be wrong. I continue experimenting. Thanks to all and I’ll let you know the results.

I unfortunately know nothing about MAX. Sorry.

And, concerning the Jump… Yes, somthing is wrong - rigid body objects is not suposed to overlap any object with collision. It’s an illegal state to begin with - So bullet just try to ‘spit it out’ as fast as possible to reach a legal state.

Ok. That sounds real good. I guess I can declare the case closed. Thanks to all.

Hi guys, I guess I was too quick to close the issue; as it happens, with 1 plank the problem is resolved increasing physics steps; but when the whole structure is together, the jittering starts and it isn’t as bad as before but still on starting the game the planks jump even if the structure as a whole doesn’t fall … I have tried the different ideas but without success; any other idea? can I post the blend so you guys can have a look; this issue is being a real show stopper and since I am just starting with Blender, it aint any good to stop now :slight_smile:

Can anybody help?

The problem is pretty generic. If physics objects is resting on each other they have to find the exact distance from each other where the force generated by the collision evens out the force pushing them together.

You may try to rise damping (it don’t really hurt in reasonable amount) to make it find it’s balance faster and softer. If You need it to be still from start let it balance it self out, then read all planks position out with a script and position all planks in that exact balanced position.

Have not tried that myself but it may work. But keep the script - the slightest change in the collision code of a future blender will change what position that is in balance.

It is probably less problem if the distance from start is a tad to big - the planks will fall together but as long the fall is short it should not be that much fuss, att least not with a little damping. There some settings like elasticity in the material tab - I have not figured them all out yet but You should be able to make the planks less bouncy. High friction can probably make the structure more stable to.