# How do I pick correct tile in isometric 3D map?

I want to know how to pick the correct tile on a isometric map in 3D space. Here is a 2D example.

They use a colour key map to correctly pick the coordinate. How can I achieve this in 3D space? Is the method similar?

• -1 this question shows lack of research. What have you tried already? Apr 12 '12 at 18:25
• Nothing in 3D at the moment, I was just trying to find subjects on it, I haven't had much luck finding examples on the internet. I have used the 2D version with color maps, but I want to convert my project into 3D. Apr 12 '12 at 18:32
• Isometric means to represent 3D objects in two dimensions. Typically when people say 3D isometric, they're talking about an isometric map with full 3D objects on it. Maybe explain more about what you have and what you're trying to do. Apr 12 '12 at 18:39
• I have probably gone ahead of myself asking this question as I haven't built anything solid in 3D yet and I have only just started with 3D. I have a 2D project at the moment which is a multidimensional array of sprites (tiles drawn on them) they are drawn so they represent a map of tiles. I have the world coordinates which are translated from the screen coordinates. To pick the correct 2D tile I use a color map sprite underneath the map of tile sprites. With 3D I image that I can use 3D primitives instead of sprites. Apr 12 '12 at 18:53
• But for picking the correct 3D tile would it be best to use a coloured primitive underneath the map of tiles to find the correct tile? Or am I just going in completely the wrong direction. Apr 12 '12 at 18:56

If all you want to do is know where on the ground the mouse is pointing, it's fairly easy. You intersect the ray with the plane z = 0. Solve the equation and you get back (x, y, 0) in world coordinates. I recommend doing this even in the regular "2D" isometric world. Color keying tiles on the ground is a lot more complicated than solving this equation (color keying might make sense for more complex shapes though).