how to get texturekoordinates with mouseklick on object in 3d

Previous topic - Next topic

Marmor

HI,

3d problem

how to get a texturekoordinate or something if i point on a textured cube or sphere ?

i create a cube and put one texture per face  on , now i will klick the cube with the mouse and get the the texturekoordinate from  the  textured object.

i hope you understand what i mean  ;)

anybody an idea ?



Kitty Hello

yes.
With X_COLLISIONRAY you get the collision test. With X_GETCOLLISIONFACE you get the information of the face (triangle) that has collision. Here you find the u,v coords for every corner.