Thursday, February 12, 2009

Directx 3d Picking

Many of you may know that picking is how you tell if a mouse is over a point in 3d space. Technically the mouse can be far away but because it is on a 2d monitor the user believes the mouse is over something. This can be achieved by using a ray traveling from the mouse pointer straight through the "3d" space in the vector direction of the camera. If this ray intersects the object than the user will seem like the mouse is over that object. It is quite a complex process to complete through code but today in class I finally finished my 3d picking object. It is a 3d cube that rotates if the mouse is over it. I do not have pictures yet, but I will post them soon.

No comments:

Post a Comment