Class MouseRay2
Represents a class for calculating a ray based on mouse input.
Inherited Members
Namespace: Genesis.Physics
Assembly: Genesis.dll
Syntax
public class MouseRay2
Constructors
MouseRay2()
Declaration
public MouseRay2()
Methods
GetRayTo(Point, PerspectiveCamera, Viewport)
Gets the ray direction from the camera's location to a specified point on the screen.
Declaration
public Vector3 GetRayTo(Point point, PerspectiveCamera camera, Viewport viewport)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The screen point |
PerspectiveCamera | camera | The camera used for perspective |
Viewport | viewport | The viewport representing the screen size |
Returns
Type | Description |
---|---|
Vector3 | The direction of the ray in world coordinates |