New Terrain & colissions ?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
lantis
Posts: 64
Joined: Thu Jun 17, 2004 2:46 pm

New Terrain & colissions ?

Post 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?
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post 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.
Image
lantis
Posts: 64
Joined: Thu Jun 17, 2004 2:46 pm

Post 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();
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post 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....
Image
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post 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.
lantis
Posts: 64
Joined: Thu Jun 17, 2004 2:46 pm

Post by lantis »

Which value you mean niko? ellipsoidRadius ? Its not good idea ;)
becuse with ellipsoidRadius must be equal to model size
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post 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.
Image
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post 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.
Image
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post 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.
Image
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Ah, ok, I'll investigate.
irkab1rka
Posts: 9
Joined: Sat Jul 09, 2005 8:06 pm

Post 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.
lantis
Posts: 64
Joined: Thu Jun 17, 2004 2:46 pm

Post by lantis »

UP!
Niko pease fix this bug ;( its really impossible to use terrain now ;(
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post 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!
Image
Post Reply