Hi..
I am having difficulty in placing my models in Terrain at a predefined locations.
When I use 3ds or .x for scene, I do not have to worry about placing.
But in Terrain, I do not know how to place models there.
Any Comment is big help..
thanks
place model in terrain at specific location
-
- Posts: 44
- Joined: Mon Dec 05, 2005 8:15 am
For your models, if your using Animated Mesh Scene nodes, then you could do something close to this
IAnimatedMeshSceneNode*Model=smgr->addMeshSceneNode("Fill in Parameters")
then to set the position you would do
Model->setPosition(vector3df("Fill in X,Y,Z chords")
Don’t copy the code i posted, its just a reference.
If I did not answer your question exactly, then please restate the problem because you were not too clear.
IAnimatedMeshSceneNode*Model=smgr->addMeshSceneNode("Fill in Parameters")
then to set the position you would do
Model->setPosition(vector3df("Fill in X,Y,Z chords")
Don’t copy the code i posted, its just a reference.
If I did not answer your question exactly, then please restate the problem because you were not too clear.
-
- Posts: 44
- Joined: Mon Dec 05, 2005 8:15 am
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
That's because a TerrainSceneNode just creates the surface to walk on or fly by, not a complete scene with entities and such. Scene loading is available for .irr and collada files, and with an extension also with anim8or files. Otherwise you have to place objects manually/with your own file format.
Last edited by hybrid on Mon Aug 21, 2006 12:43 pm, edited 1 time in total.
-
- Posts: 44
- Joined: Mon Dec 05, 2005 8:15 am
hybrid wrote:That's because a TerrainSceneNode just creates the surface to walk on or fly by, not a complete scene with entities and such. Scene loading is available for .ii and collada files, and with an extension also with anim8or files. Otherwise you have to place objects manually/with your own file format.
I will save terrain as wrl format then load it from Max and place my model on it . Then load my models in irrlicht.
Thanks
Also, I've made a post for a quicker method to get the height on the terrain at a given x and z position.
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14874
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14874
-
- Posts: 44
- Joined: Mon Dec 05, 2005 8:15 am
Spintz wrote:Also, I've made a post for a quicker method to get the height on the terrain at a given x and z position.
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14874
I finally added code for exporting terrain to VRML(wrl) format.
So now I could place my models on the terrain.
thanks