OK, I used irredit to generate my world terrain
I don't have much heightmaps so I used the default one that comes with irredit, it generates the terrain nicely and I was able to load it with irrlicht
the problem is when I want to do collision with it, I've tried code from example 7,but it didn't work
I've changed the code in example 7 a bit to fit my need, for example I don't use the addZipFileArchieve() but I used loadScene()
after that I don't know what parameter should be used in the smgr->getMesh() (the code in example 7 used it though) but since there's no mesh file in my .irr file I used the heightmap as the parameter
as expected, it generates an error saying that the file format is not supported
so how do you do collision detection with terrain? I've searched this forum but what I got is the code to get the mesh file in your .irr file (which doesn't work for me because there's no mesh file, just a terrain generated from heightmap)
[ask] how do we do colllision with terrain?
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Re: [ask] how do we do colllision with terrain?
When your .irr scene is loaded, Irrlicht creates scene nodes and adds them to your Irrlicht scene. ISceneManager provides methods to retrieve one, some or all scene nodes.Daggio wrote:I don't know what parameter should be used in the smgr->getMesh() (the code in example 7 used it though) but since there's no mesh file in my .irr file
For your purposes, the simplest way is probably ISceneManager::getSceneNodeFromName() (I'm assuming that you know the name of the terrain, from IrrEdit).
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way