You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If they were provided separately, it would be much easier to get the ray corresponding to a specific point on the screen. Alternatively, the entire operation (pictured below) could be provided as a method, returning the ray in world space:
// Ray in eye/view spacelet ray_eye = projection_matrix.inverse()*vec4(screen_pos.x, screen_pos.y, -1.,1.);// Ray in world spacelet ray_world = view_matrix.inverse()*vec4(ray_eye.x, ray_eye.y, -1.,0.).normalize();
The text was updated successfully, but these errors were encountered:
Mouse picking, the process of picking an entity or point in 3D space with your mouse, requires that the projection and view matrices be separate.
Currently, these two are available only together, through the
matrix()
method:macroquad/src/camera.rs
Lines 209 to 225 in bd00be0
If they were provided separately, it would be much easier to get the ray corresponding to a specific point on the screen. Alternatively, the entire operation (pictured below) could be provided as a method, returning the ray in world space:
The text was updated successfully, but these errors were encountered: