Page 1 of 1

Terrain maps and collision detection

Posted: Mon Feb 06, 2006 4:21 pm
by Raven_coda
I'm having trouble using the collision detection work on terrain maps. It seems I fall through every time. I've looked at the tutorials and thought I setup it up correctly but I guess not. I think a more precise example would be all I need. I don't think anyone wants to read my code so maybe somebody could just show what code I'd have to add to the terrain map example to make it collision detect with the camera. :roll: Thanks in advance for the help.

Posted: Mon Feb 06, 2006 4:52 pm
by Saku
Your problems might very well be caused by a known bug in the new version 0.14.0.
There are some problems with terrainnodes which is further explained in the bug forum.
Try running your code on the version 0.12.0 irrlicht.

Posted: Mon Feb 06, 2006 9:42 pm
by bitplane
I think the collision sphere falls through the triangles in the terrain if its too big, but this code is much faster than using collision detection on the mesh-
http://irrlicht.sourceforge.net/phpBB2/ ... hp?p=63079

Posted: Tue Feb 07, 2006 12:40 pm
by bearSoft

Code: Select all

I think the collision sphere falls through the triangles in the terrain if its too big
When i started with the first irr terrainnode i had this 'fall through' behavior. I came to the conclusion that if i scaled the terrain mesh, then i would have this problem..
I dont know if thats the whole story?

In that referenced adv-snippet there is xml-load intermingled in the code..
eg
getPixel((s32)XMLimportXpos,(s32)XMLimportYpos)
is it imposible to use this without that xml stuf..
(i'm definately not in adv. forum at this moment in time.. xml is not an needed option right now)

Posted: Tue Feb 07, 2006 1:15 pm
by bitplane
if you read it closely, you'll find there's no xml code whatsoever included in that snippet ;)
(XMLimportXpos and XMLimportYpos are just variables)