Steve, FellippeHeitor, thank you very much for this program. This is exactly what I was thinking about when using the mouse and the MAPTRIANGLE 3D command, which is based on OpenGL just like _DEVICEINPUT, because in the OpenGL space that generates MAPTRIANGLE 3D with MOUSEINPUT, I have to recalculate it. I needed to get mouse coordinates in the OpenGL coordinate system. I'll try to implant it tomorrow. For information on Dungeon - I already have a program that translates the map from the map image (from PNG) to OpenGL (for MAPTRIANGLE 3D), and the display in the space is correct, but I will still solve the collision scheme. The easiest way will be a 2D field that solves a collision when converting a map from PNG to an OpenGL coordinate system. The big problem I'm addressing today is a way of calculating visibility in a space that limits the number of elements to display in the array. It will take a while. But I'm a lot out of theme of this thread.