Node picking

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
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Node picking

Post by Tyn »

Hey

I'm trying to pick tiles that I have drawn from the screen coords, the actual picking works fine now ( I had a few probs before, posted a while back ) but my problem now is what to do with the node that is returned. I've done a Typedef MapTile, which includes the map tile X, Y and Z coords, whether the tile is passable etc. for pathfinding and a pointer to ISceneNode.

Does anyone know a quick way I can get the Typedef object from the pointer to ISceneNode? I know 2 ways I can do it, but my picking is inside the while loop and my methods involve for loops. Not good when I have a 40 x 40 map that is bound to get bigger.
Post Reply