I have a problem with OOP+irrlicht custom scene nodes
I am trying to create a class for each entity within my game,and manipulate them induvidually.
I have a class called Bug, i create n number of objects, place them in a 3d world etc...
i use
Code: Select all
IAnimatedMesh* buggmesh = smgr->getMesh("bug2.b3d");
IAnimatedMeshSceneNode* bugg =
and use
Code: Select all
bugg->setPosition(....
which works fine.
The problem i have is this....
In the class i have my AI setup, which,say, tells the bug what to do.But as all the objects have the same mesh identifier
Code: Select all
IAnimatedMeshSceneNode* bugg =
when i use
Code: Select all
bugg->setPosition(bugg->getPosition()+vector3df(0,0,-0.15));
Hmmm, Sorry, i have difficulty writing what im thinking.
I know how to create static objects that use the same mesh, it is just a case of loading them, then forgetting them(if you wish)
but i need to identify each movable object....
eg.
i want to write...
Code: Select all
for(n=0;n<10;n++)
bug.update(n)
I hope this makes sense, if not i will try to explain again.
pls note i am fairly good at programming,just not explaining.
thanks for reading this all the same, i will add to this if i think of another way to explain