Fix editor raycast
This commit is contained in:
@@ -1398,9 +1398,9 @@ namespace FlaxEditor.Viewport
|
||||
Matrix.Multiply(ref v, ref p, out var ivp);
|
||||
ivp.Invert();
|
||||
|
||||
// Create near and far points
|
||||
var nearPoint = new Vector3(mousePosition, _nearPlane);
|
||||
var farPoint = new Vector3(mousePosition, _farPlane);
|
||||
// Create near and far points, with device depth of 1 and 0 respectively
|
||||
var nearPoint = new Vector3(mousePosition, 1.0f);
|
||||
var farPoint = new Vector3(mousePosition, 0.0f);
|
||||
viewport.Unproject(ref nearPoint, ref ivp, out nearPoint);
|
||||
viewport.Unproject(ref farPoint, ref ivp, out farPoint);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user