GLBasic forum

Main forum => GLBasic - en => Topic started by: Marmor on 2011-Feb-26

Title: how to get texturekoordinates with mouseklick on object in 3d
Post by: Marmor on 2011-Feb-26
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 ?


Title: Re: how to get texturekoordinates with mouseklick on object in 3d
Post by: Kitty Hello on 2011-Feb-28
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.