Screen Coords to UV Coords

Blitz3D Forums/Blitz3D Programming/Screen Coords to UV Coords

ClayPigeon(Posted 2012) [#1]
OK, the stripped down explanation of my problem is as follows: I need to CameraPick a triangle on a mesh, then find out what pixel of the texture (that is applied to the mesh) that the CameraPick hit. I need to do this because I need to be able to paint directly to the mesh from the viewport.

Currently I'm not worried about anything special, such as generating unique UV coords for every triangle, or airbrush style painting. I just need to be able to paint pixels visually onto the model's texture. Essentially, I need to find out the UV coords that my mouse is currently hovering over in the game window.

Does anyone know how this would be accomplished?

EDIT: FORGET THAT! I apologize, I have just stumbled upon the Picked...U,V,W() commands. Let's just pretend this never happened! :D

Last edited 2012