New Terrain & colissions ?
New Terrain & colissions ?
Seems new TerrainSceneNode have broken collision mechanism.
Its work fine , but sometimes collisions don't work and im can run over terrain.
P.S. Niko can you please post your opinion and maybe promise to fix it in
new realease?
Its work fine , but sometimes collisions don't work and im can run over terrain.
P.S. Niko can you please post your opinion and maybe promise to fix it in
new realease?
Hello Spintz!
First - tnx for very nice terrain
Its easy to reproduce this bug - just replace in Irr0.9 terrain example code
for createCollisionResponseAnimator - set ellipsoidRadius to 10,40,10 and
gravity to -1
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(10,40,10),
core::vector3df(0,-1.0f,0),
core::vector3df(0,0,0));
camera->addAnimator(anim);
anim->drop();
First - tnx for very nice terrain
Its easy to reproduce this bug - just replace in Irr0.9 terrain example code
for createCollisionResponseAnimator - set ellipsoidRadius to 10,40,10 and
gravity to -1
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(10,40,10),
core::vector3df(0,-1.0f,0),
core::vector3df(0,0,0));
camera->addAnimator(anim);
anim->drop();
I've tinkered with the sliding value and it has no affect, you still fall through the terrain. When I use TrueAxis and collide with the terrain, I have no problems and do not fall through, that makes me believe it's something that's changed with the collison animator and not a problem with the geometry of the terrain.
I'm looking at the collision animator now and seeing how I can debug this and see what conditions are causing the object to fall through the terrain. I'll keep you all updated on what I do/don't find....I am still looking at this problem though.
I'm looking at the collision animator now and seeing how I can debug this and see what conditions are causing the object to fall through the terrain. I'll keep you all updated on what I do/don't find....I am still looking at this problem though.
Can you do me a favor and change the function call to createCollisionResponseAnimator in the terrain example that comes with Irrlicht 0.9 to this :
I want to see if the node will fall through the terrain if their is no ellipsoid translation. I believe the vertical translation of the node puts it above the Y extents of the bbox for the terrain patch it is over and the collision animator gets no triangles returned, and forces the object to fall, putting it below the terrain. It works for me if I remove the ellipsoid translation. I'm looking into a way to fix the bug now.....most likely will change the box test in CTerrainTriangleSelector to only check the X and Z values for intersections and ignore the Y extents of the bounding boxes.
Code: Select all
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(10,40,10),
core::vector3df(0,-1,0),
core::vector3df(0,0,0)
);
Ok, well it's definitely a problem with bounding boxes, but I'm on the thought process now that it has something to do with the way the bounding boxes are calculated for the patches. Niko changed this code when he integrated it into Irrlicht from my GeoMipMapSceneNode and apparently it doesn't properly calculate the bounding boxes of the terrain patches.