Page 1 of 1

Objects

Posted: Sat Sep 06, 2003 11:34 am
by Cleves
Hey all,

Alright i created a level using 3ds max and i put some objects,let's say a box, also i created a player.i loaded the level and player with irrlicht.
Now the player wants to open that box so he presses on it but, here comes my question, How can i know if the player pressed on the box?
If i created the box with the level in max,irrlicht dosen't know about it's exsistence,maybe if i load the object sepreatly? but then i need to load hundreds of objects and it dosen't make sense.

Thanks alot.

Posted: Sat Sep 06, 2003 12:10 pm
by niko
It's a good idea to load the object separetely. And why do you think loading hundrets of objects doesn't make sense? If they are all boxes, you'll only need to load the mesh once.

Posted: Sat Sep 06, 2003 12:48 pm
by Cleves
When i meant that if i got alot of objects the player needs to interact with it's a lot of code to load them all.
Alright thanks for clearing it up niko.

Posted: Mon Sep 08, 2003 12:06 pm
by WhytWulf
Cleves, wouldn't it be easier to do it this way.
1) create you world/game map
2) create another file-could be made on the like creating waypoints in quake/halflife games for bots, these waypoints represent various objects (chests, item spawns, etc), this file would also have to store the x,y,z.
3) iterate through the item file(s) to populate the world.

Yes you would still have to create the obejcts seperate, but think about it this way, if you create them as part of another mesh/model and if you want to change the shape later on, that could be alot of trouble, as you would have to change them all.

Posted: Mon Sep 08, 2003 12:17 pm
by Cleves
Mmmm..it may be a good idea.
Thanks for the advice 8)