Skip to content

Latest commit

 

History

History
 
 

lesson_039

Fun with WebGL 2.0 - 039 - Mouse Ray Casting

Description: Today we're going to discuss how we can translate our browser's X,Y mouse coordinates into 3d positions in our virtual world. There is two methods we can use, one creates a direction that we can point at the other side of the frustrum or by creating two points that are on opposite ends of the frustrum based on the direction we're looking and where the mouse was clicked.

Links of Interest

http://antongerdelan.net/opengl/raycasting.html https://stackoverflow.com/questions/20140711/picking-in-3d-with-ray-tracing-using-ninevehgl-or-opengl-i-phone/20143963#20143963

Links