Hello,
I'm looking for create a terrain and load houses, i make this with irrEdit-0.6. I create some *.irrs and i want to posicionate each house in his correct place.
Can it load scene into a node and then move all parts or i need to read each id and move it.
Thanks.
LoadScene into a node
You could create a dummy node as root with addEmptySceneNode() for this...
But I don't know how to use this with IrrEdit (I don't use it)...
But I don't know how to use this with IrrEdit (I don't use it)...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Posts: 7
- Joined: Fri Feb 09, 2007 5:12 pm
Well, then try it with an empty scene node, like I told you...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Posts: 156
- Joined: Wed Jul 21, 2004 4:29 am
- Location: Mishawaka, In
not sure if this is what you want but
are you trying to position your buildings and what not with Irredit or the engine?
what you could do is place your buildings in IrrEdit , Take note of thier positions from the attributes pane and write them down , ( i use note pad for this) , also Name the buildings in the attribute pane and remember the names. than save the scene.
then create your terrain scene node in code ( IrrEdit doesnt support terrain yet )
then use something like:
this will give you access to the mesh you named "somename" and you should now be able to manipulate it to a point, atleast enough for your purposes.
and than because you have cast it as an animated mesh scene node:
just what i gather you are trying to do , would help if you could explain in a bit more detail your intent. but hopefuly this will help
what you could do is place your buildings in IrrEdit , Take note of thier positions from the attributes pane and write them down , ( i use note pad for this) , also Name the buildings in the attribute pane and remember the names. than save the scene.
then create your terrain scene node in code ( IrrEdit doesnt support terrain yet )
then use something like:
Code: Select all
IAnimatedMeshSceneNode* somenode = (IAnimatedMeshSceneNode*)smgr->getSceneNodeFromName("somename");
and than because you have cast it as an animated mesh scene node:
Code: Select all
somenode->setPosition(core::vector3df( x, y, z));
-
- Posts: 7
- Joined: Fri Feb 09, 2007 5:12 pm
The problem is that I don't know how many objects are in each terrain, I'm making a big landscape divided in tiles, for each tile are some diferent objects. I make a xml file with all objects I want to load, and for example there are diferent types of walls, one with a door, another with a window, stairs, etc... and into another xml file are the position of all in his tile. I use IrrEdit cos I can see the results, I put it all start in 0,0,0 for each building and i want to replace all parts of the building in his correct place of the map, i think it's better make all hardcoded :-S or maybe put absolute values to all objects.
Thanks for all.
Thanks for all.
No, I would go the other (dynamic) way !!!Lord_Fausto wrote:i think it's better make all hardcoded :-S or maybe put absolute values to all objects.
But I think you'll have to write your own "level-loader" for this...
maybe like this:
1. parse for objects (house)
2. for each object create an empty scene node
3. parse for all elements that builds the house (walls)
4. add all elements as children to the empty node
5. place the empty node (whole house) in the terrain
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Posts: 156
- Joined: Wed Jul 21, 2004 4:29 am
- Location: Mishawaka, In
ok
what are you using to build the terrain?