Displaying hints

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
iona
Posts: 19
Joined: Mon May 29, 2006 6:29 pm

Displaying hints

Post by iona »

Hi,

I want to display a hint while player is looking at an object. It would work like this:

Code: Select all

+ In 3d studio I give a name ('test') to an object on the level
+ Then I export the scene to *.my3d

.. and in program..
+ I do collision detection (just like in tutorial with triangle picking) 
+ AND somehow I obtain name of object 
       (+ if (name=="test") { ... }) 
I know that my3d format stores information about names from 3dmax.

It's hard to find for me if the CMY3DMeshFileLoader loads this informations, but even if not it should be easy to modify it to do so.

And now, THE QUESTION: is there a not-to-hard to detect that user is looking on a object marked by me ?
Or do I have to add everywhere custom scene node with mesh etc etc ? (i would be happy if i hadn't :)

Help !
iona
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The only possibility to store sub-mesh structures is by using mesh buffers. And these are unnamed. So I doubt that there's an easy solution for it.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

If you make these special things into their own mesh, you could create new scene nodes for each of them. Then you could use the ICollisionManager to see if your node is being looked at.

Travis
Post Reply