how to select model

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Guest

how to select model

Post by Guest »

is there any way to select the model like in warcraft3
LordNaikon
Posts: 164
Joined: Wed May 05, 2004 5:34 pm
Location: Germany Berlin
Contact:

Post by LordNaikon »

you could check wich node is in front of your camera.

you could number all of your nodes and then check if your camera "front view line" iss collideing with your node.

Code: Select all

public boolean onMouseEvent(BH_MouseEvent event)
  {    // fragetussi anklicken
   if (event.Event == 0 && currentScene == 3 && smgr.getSceneCollisionManager().getSceneNodeFromCameraBB(camera).getID() == 666 )
   {
     FAmgr.saveAnswer(BNr);
     FAmgr.DeActivateAll();

     if(FAmgr.isNextFr(FbNr, FNr))
     {
       FNr++;
       return false;
     }
     else
     {
       currentScene = 4;;//currentScene = 1;
       credits();
       return false;
     }

   }
a sample of one of my projects

hope i could help ...

but i don't know how to solve this with mouseclicks maybe there are some getSceneNodeFromMouse() :D
q|^.^|p beeing every time friendly to everyone
sys: 2500+Barton 512MB 6600GT WinXP
Post Reply