Class CameraFPSModeHandler
Input handler for movement in the device view and game view when using SimulatedCameraProvider.
Namespace: Unity.MARS.Data.Synthetic
Syntax
public class CameraFPSModeHandler : object
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 |
|---|---|
| Boolean |
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 |
|---|---|
| Boolean |
Methods
CalculateMovement(Pose, Boolean)
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. |
| Boolean | invertY | Invert the Y axis of the mouse position. |
Returns
| Type | Description |
|---|---|
| Pose |
HandleGameInput()
Handle the FPS mode movement from a game view.
Declaration
public void HandleGameInput()
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 = null)
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 |
StopMoveInput(Vector2)
End all movement.
Declaration
public void StopMoveInput(Vector2 mousePosition)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | mousePosition | The current mose position. |