I want to do something similar to a raycast. With a raycast, you can set an origin and a destiny, and check where the ray collides with something but only with a line. What I want to do, is given an origin with x
, y
and z
coordinates, check which is the closest point it collides in a mesh. so if I have a box in 0, 0, 0
with width 2, and my origin is on 0, 0.5, 0
, the algorithm/function should return that the closest point it collides is 0, 1, 0
. I hope I am clear enough.
I am using Ogre3D, and bullet physics. I can also use OpenGL.
Thanks.