How do I get the current mouse screen coordinates in WPF?
Or in pure WPF use PointToScreen. Sample helper method: // Gets the absolute mouse position, relative to screen Point GetMousePos() => _window.PointToScreen(Mouse.GetPosition(_window));
Or in pure WPF use PointToScreen. Sample helper method: // Gets the absolute mouse position, relative to screen Point GetMousePos() => _window.PointToScreen(Mouse.GetPosition(_window));
You do not need to have any objects in your scene to do this. You already know the camera position. Using vector.unproject( camera ) you can get a ray pointing in the direction you want. You just need to extend that ray, from the camera position, until the z-coordinate of the tip of the ray … Read more