I have multiple cubes in 3d space which a camera rotates around. I would like to "hover" the mouse over a cube to identify which class belongs to the cube I am currently over.
I have thought of two solutions to achieve this
1)
generate a 2d hotspot map based off of where the cubes are in reference to the camera screen (make it so the 3d cubes would be recognizable in 2d space by a mouse).
How do I know where the vanish point is for 3D so I can accurately predict where the cubes should be in the window?
2)
my second thought was to generate a line perpendicular to the camera window into 3d space and see if it went through any of the cubes.
Once again how do I know the vanish point for a 3d camera?
Is there an easier way to accomplish what i am trying to achieve?
Is there a way to access the location of the vertices of a box?
If I place a box in somewhere in 3d space (using the built in box(float,float,float)), I need to know where each of the vertices are in reference to the origin.