Need help with crate stacking...

Sven

15-07-2008 16:19:46

I've been getting to grips with OgreOde and have a handle on most of the material used in the SimpleScenes demos but I'm having problems stacking crates; my stacks always fall apart from all the jitter.

Looking at the SimpleScenes Crash demo, the crates don't jitter and start off/quickly revert to sleep mode. I've based my code around the code in the Crash demo, using the same code to create the crates and handle collisions (minus the code for rocket explosions) using the same parameters, but I can't see why my crates jitter.

Anyone have any experience stacking crates? any ideas?

Sven

15-07-2008 23:32:41

oki kokes
I realised what was happening.

in my collision function, i had the code...

if (b1 && b2 && OgreOde::Joint::areConnected(b1, b2))
return false;

which was leftover from the overridden SimpleScenes collision function (used to ignore collisions between connected joints). (*edit, i actually had it in there from rewb0rn's collision tutorial - any idea how to avoid this jitter problem but still be able to ignore connected joints?)

Some of the crate surfaces are considered jointed/connected by ODE so this code causes the contact to sometimes be ignored.