Collision detection in terrain addon

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Conner
Posts: 4
Joined: Fri Oct 10, 2003 2:40 pm

Collision detection in terrain addon

Post by Conner »

I started with the collision demo, got that up and running. 10,000 triangles at 100+ FPS, wonderful.

I took the collision demo and replaced the loaded mesh with the one from the terrain generator. This is an animated mesh of 170,000 triangles.

What is the correct way to use the createCollisionResponseAnimator with this ? Currently I am using createTriangleSelector and setTriangleSelector. which I know are not meant for large levels. The reason I used them was when I tried to pull mesh 0 out of the animated mesh and use that to create an octtree node the engine never returned.

What I tried was ( in pseudo code ):
mesh = terrainGen.renderterrain();
node = smgr->addOctTreeSceneNode( mesh->getMesh(0));
This never returned and I assume was an invalid operation.

My current implementation only gives me 2 FPS, I assume due to the large number of triangles. Whats the correct way to add collision detection for the camera in the terrain addon ?
- Conner
Guest

Post by Guest »

Update: Turns out it wasn't hanging, it was just taking a long time. I waited 5 minutes and it finally added the octnode. I'm going to modify the terrain generator to have a LOD that reduces the triangle count. I think I can then add a second node that I use as the octnode for collision detection.
Conner
Posts: 4
Joined: Fri Oct 10, 2003 2:40 pm

Post by Conner »

Apparently I am not good at searching. Finally found all the threads that went through the same thing I did. Everything works wonderful now, thanks KnightToFlight, et all.

The reason I ended up repeating all this is the sourceforge file list still has the 0.1 version of the terrain gen. When I first discovered Irrlicht, I d/l'd my files from (project page)->(view ALL project files). Could someone update this list so another noob doesn't fall into the same pit.

http://sourceforge.net/project/showfile ... p_id=74339

Thanks.
- Conner
Post Reply