JV-ODE Physics Thread 10

Blitz3D Forums/Blitz3D Userlibs/JV-ODE Physics Thread 10

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

hmm...yes one small issue remains, if you want one ^^
well, its less an issue than a need for clarification, at least i know WHY this happens, but found no solution/workaround yet..

so, let me explain:
in our game, cars can be destroyed. if that happens, the original car with its complete structure (meshes, ode-bodies/geoms/joints, type instances etc) are getting removed from the game. at the position + rotation of the original car, a new entity gets spawned, we call them 'wreckages'. those little beasties consist of nearly the same geometry as its original entity, but split up into several pre-broken meshes (like the wheels, chassis, doors, spoilers and so on...) which are independent each of its own without any joints or the like limiting it. then they get some random forces + torque applied (transformed from the center to the outside) so they explode nicely and all those debris are flying around (may well hit other stuff + shaking/damaging it etc). the geoms of most of the debris are made of simple native classes from ode (mostly boxes, but also capsules or spheres) and a few of them are trismeshes, e.g. the wheels need trimesh geoms, just because there is no builtin flat cylinder class...so far so good.
now for the interesting part: the debris using trismesh geoms are coming to rest perfectly, getting disabled and just waiting till their lifespan is over, causing nearly no additional computing time. but the NATIVE builtin geom classes, especially boxes, sometimes are never getting to rest and jitter around a few thousandth of a unit. this happens if they are lying on a complete flat surface. i tried several things, including manually disabling or increasing damping values for them, with absolutely NO success. those nasty boxes are jittering around till they get removed from the game, causing severe slowdowns in larger battles (with ~20-30 wreckages). the only thing i could do at the moment is, decreasing the lifetime of the debris to only some seconds, but this bugs me, because i want to see at least expanse of ruins if i lost all my cars already ^^

and i think i know why this happens: its because contact joints are getting created over and over for them, enabling them on every step the simulation takes...am i right? what to do about it? any tricks left in your drawer? :D



eek, there goes another novel...