Class CameraFPSModeHandler
Input handler for movement in the device view and game view when using SimulatedCameraProvider.
Inherited Members
Namespace: Unity.MARS.Data.Synthetic
Assembly: Unity.MARS.dll
Syntax
[MovedFrom("Unity.MARS")]
public class CameraFPSModeHandler
Fields
activeHandler
The active camera fps mode handler.
Declaration
public static CameraFPSModeHandler activeHandler
Field Value
| Type | Description |
|---|---|
| CameraFPSModeHandler |
Properties
MoveActive
Is there active movement.
Declaration
public bool MoveActive { get; }
Property Value
| Type | Description |
|---|---|
| bool |
MovementBounds
The bounds of the movement area.
Declaration
public Bounds MovementBounds { get; set; }
Property Value
| Type | Description |
|---|---|
| Bounds |
UseMovementBounds
Use MovementBounds bounds to restrict movement.
Declaration
public bool UseMovementBounds { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
CalculateMovement(Pose, bool)
Calculate the new pose for the camera based on the fps mode movement.
Declaration
public Pose CalculateMovement(Pose pose, bool invertY = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Pose | pose | Current Pose of the transform we are going to move. |
| bool | invertY | Invert the Y axis of the mouse position. |
Returns
| Type | Description |
|---|---|
| Pose |
HandleGUIInput(Rect, Event, EventType, Vector2)
Handle the fps movement input in the given rect.
Declaration
public void HandleGUIInput(Rect rect, Event currentEvent, EventType type, Vector2 eventDelta = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | rect | The rect the the input handling is masked to. |
| Event | currentEvent | Current unity event to process. |
| EventType | type | The event type, cached from the beginning of OnGUI |
| Vector2 | eventDelta | Mouse delta from current event, cached at the beginning of OnGUI |
HandleGameInput()
Handle the FPS mode movement from a game view.
Declaration
public void HandleGameInput()
StopMoveInput(Vector2)
End all movement.
Declaration
public void StopMoveInput(Vector2 mousePosition = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | mousePosition | The current mouse position. |