Page 1 of 1

New Terrain & colissions ?

Posted: Wed Apr 13, 2005 10:56 am
by lantis
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?

Posted: Wed Apr 13, 2005 2:55 pm
by Spintz
Can you provide an example? If anything, at least the heightmap you're using and the parameters you're using for creating the selector and however you're doing your collision. If you're using the collisionResponseAnimator, then please provide your arguments for creating that as well.

Posted: Thu Apr 14, 2005 8:52 am
by lantis
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();

Posted: Thu Apr 14, 2005 3:43 pm
by Spintz
Well, the good news is, it's reproducable, no clue what's causing it though. When I can figure anything out, I'll let ya know....

Posted: Thu Apr 21, 2005 12:47 pm
by niko
I don't know yet too.
And I haven't tried it out yet, but I think adjusting the 'slidingvalue' parameter a little bit when creating the animator could help.

Posted: Fri Apr 22, 2005 3:44 pm
by lantis
Which value you mean niko? ellipsoidRadius ? Its not good idea ;)
becuse with ellipsoidRadius must be equal to model size

Posted: Fri Apr 22, 2005 4:02 pm
by Spintz
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.

Posted: Fri Apr 22, 2005 4:36 pm
by Spintz
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 :

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)
);
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.

Posted: Fri Apr 22, 2005 6:18 pm
by Spintz
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.

Posted: Sun May 01, 2005 7:45 am
by niko
Ah, ok, I'll investigate.

Posted: Sun Jul 17, 2005 9:33 am
by irkab1rka
The bug seems to me still exists in v0.10.0. Do we have any rss/watch list? I'd like to get a mail when it is fixed. Also if anyone have an example code how to write my collision detection algorhytm or how can i use one which works better, please let me know.

Posted: Thu Aug 25, 2005 3:11 pm
by lantis
UP!
Niko pease fix this bug ;( its really impossible to use terrain now ;(

Posted: Mon Sep 19, 2005 1:35 pm
by Spintz
If you look at other threads here in Bug Reports, with new Terrain Files and and collision and FPU precision fix for DirectX, it should all be fixed now!