Controls the player's movement in virtual reality.
More...
|
float | Acceleration = 0.1f |
| The rate acceleration during movement. More...
|
|
float | Damping = 0.3f |
| The rate of damping on movement. More...
|
|
float | BackAndSideDampen = 0.5f |
| The rate of additional damping when moving sideways or backwards. More...
|
|
float | JumpForce = 0.3f |
| The force applied to the character when jumping. More...
|
|
float | RotationAmount = 1.5f |
| The rate of rotation when using a gamepad. More...
|
|
float | RotationRatchet = 45.0f |
| The rate of rotation when using the keyboard. More...
|
|
bool | SnapRotation = true |
| The player will rotate in fixed steps if Snap Rotation is enabled. More...
|
|
bool | RotateAroundGuardianCenter = false |
| [Deprecated] When enabled, snap rotation will happen about the guardian rather than the player/camera viewpoint. More...
|
|
int | FixedSpeedSteps |
| How many fixed speeds to use with linear movement? 0=linear control More...
|
|
bool | HmdResetsY = true |
| If true, reset the initial yaw of the player controller when the Hmd pose is recentered. More...
|
|
bool | HmdRotatesY = true |
| If true, tracking data from a child OVRCameraRig will update the direction of movement. More...
|
|
float | GravityModifier = 0.379f |
| Modifies the strength of gravity. More...
|
|
bool | useProfileData = true |
| If true, each OVRPlayerController will use the player's physical height. More...
|
|
float | CameraHeight |
| The CameraHeight is the actual height of the HMD and can be used to adjust the height of the character controller, which will affect the ability of the character to move into areas with a low ceiling. More...
|
|
bool | Teleported |
| This bool is set to true whenever the player controller has been teleported. It is reset after every frame. Some systems, such as CharacterCameraConstraint, test this boolean in order to disable logic that moves the character controller immediately following the teleport. More...
|
|
bool | EnableLinearMovement = true |
| When true, user input will be applied to linear movement. Set this to false whenever the player controller needs to ignore input for linear movement. More...
|
|
bool | EnableRotation = true |
| When true, user input will be applied to rotation. Set this to false whenever the player controller needs to ignore input for rotation. More...
|
|
bool | RotationEitherThumbstick = false |
| Rotation defaults to secondary thumbstick. You can allow either here. Note that this won't behave well if EnableLinearMovement is true. More...
|
|
|
Action< Transform > | TransformUpdated |
| This event is raised after the character controller is moved. This is used by the OVRAvatarLocomotion script to keep the avatar transform synchronized with the OVRPlayerController. More...
|
|
Action | CameraUpdated |
| This event is raised immediately after the camera transform has been updated, but before movement is updated. More...
|
|
Action | PreCharacterMove |
| This event is raised right before the character controller is actually moved in order to provide other systems the opportunity to move the character controller in response to things other than user input, such as movement of the HMD. See CharacterCameraConstraint.cs for an example of this. More...
|
|
Controls the player's movement in virtual reality.
◆ GetHaltUpdateMovement()
void OVRPlayerController.GetHaltUpdateMovement |
( |
ref bool |
haltUpdateMovement | ) |
|
Gets the halt update movement.
- Parameters
-
haltUpdateMovement | Halt update movement. |
◆ GetMoveScaleMultiplier()
void OVRPlayerController.GetMoveScaleMultiplier |
( |
ref float |
moveScaleMultiplier | ) |
|
Gets the move scale multiplier.
- Parameters
-
moveScaleMultiplier | Move scale multiplier. |
◆ GetRotationScaleMultiplier()
void OVRPlayerController.GetRotationScaleMultiplier |
( |
ref float |
rotationScaleMultiplier | ) |
|
Gets the rotation scale multiplier.
- Parameters
-
rotationScaleMultiplier | Rotation scale multiplier. |
◆ GetSkipMouseRotation()
void OVRPlayerController.GetSkipMouseRotation |
( |
ref bool |
skipMouseRotation | ) |
|
Gets the allow mouse rotation.
- Parameters
-
skipMouseRotation | Allow mouse rotation. |
◆ Jump()
bool OVRPlayerController.Jump |
( |
| ) |
|
Jump! Must be enabled manually.
◆ ResetOrientation()
void OVRPlayerController.ResetOrientation |
( |
| ) |
|
Resets the player look rotation when the device orientation is reset.
◆ SetHaltUpdateMovement()
void OVRPlayerController.SetHaltUpdateMovement |
( |
bool |
haltUpdateMovement | ) |
|
Sets the halt update movement.
- Parameters
-
haltUpdateMovement | If set to true halt update movement. |
◆ SetMoveScaleMultiplier()
void OVRPlayerController.SetMoveScaleMultiplier |
( |
float |
moveScaleMultiplier | ) |
|
Sets the move scale multiplier.
- Parameters
-
moveScaleMultiplier | Move scale multiplier. |
◆ SetRotationScaleMultiplier()
void OVRPlayerController.SetRotationScaleMultiplier |
( |
float |
rotationScaleMultiplier | ) |
|
Sets the rotation scale multiplier.
- Parameters
-
rotationScaleMultiplier | Rotation scale multiplier. |
◆ SetSkipMouseRotation()
void OVRPlayerController.SetSkipMouseRotation |
( |
bool |
skipMouseRotation | ) |
|
Sets the allow mouse rotation.
- Parameters
-
skipMouseRotation | If set to true allow mouse rotation. |
◆ Stop()
void OVRPlayerController.Stop |
( |
| ) |
|
◆ UpdateController()
virtual void OVRPlayerController.UpdateController |
( |
| ) |
|
|
protectedvirtual |
◆ UpdateMovement()
virtual void OVRPlayerController.UpdateMovement |
( |
| ) |
|
|
virtual |
◆ UpdateTransform()
void OVRPlayerController.UpdateTransform |
( |
OVRCameraRig |
rig | ) |
|
Invoked by OVRCameraRig's UpdatedAnchors callback. Allows the Hmd rotation to update the facing direction of the player.
◆ Acceleration
float OVRPlayerController.Acceleration = 0.1f |
The rate acceleration during movement.
◆ BackAndSideDampen
float OVRPlayerController.BackAndSideDampen = 0.5f |
The rate of additional damping when moving sideways or backwards.
◆ CameraHeight
float OVRPlayerController.CameraHeight |
The CameraHeight is the actual height of the HMD and can be used to adjust the height of the character controller, which will affect the ability of the character to move into areas with a low ceiling.
◆ CameraRig
◆ Controller
CharacterController OVRPlayerController.Controller = null |
|
protected |
◆ Damping
float OVRPlayerController.Damping = 0.3f |
The rate of damping on movement.
◆ EnableLinearMovement
bool OVRPlayerController.EnableLinearMovement = true |
When true, user input will be applied to linear movement. Set this to false whenever the player controller needs to ignore input for linear movement.
◆ EnableRotation
bool OVRPlayerController.EnableRotation = true |
When true, user input will be applied to rotation. Set this to false whenever the player controller needs to ignore input for rotation.
◆ FixedSpeedSteps
int OVRPlayerController.FixedSpeedSteps |
How many fixed speeds to use with linear movement? 0=linear control
◆ GravityModifier
float OVRPlayerController.GravityModifier = 0.379f |
Modifies the strength of gravity.
◆ HmdResetsY
bool OVRPlayerController.HmdResetsY = true |
If true, reset the initial yaw of the player controller when the Hmd pose is recentered.
◆ HmdRotatesY
bool OVRPlayerController.HmdRotatesY = true |
If true, tracking data from a child OVRCameraRig will update the direction of movement.
◆ JumpForce
float OVRPlayerController.JumpForce = 0.3f |
The force applied to the character when jumping.
◆ RotateAroundGuardianCenter
bool OVRPlayerController.RotateAroundGuardianCenter = false |
[Deprecated] When enabled, snap rotation will happen about the guardian rather than the player/camera viewpoint.
◆ RotationAmount
float OVRPlayerController.RotationAmount = 1.5f |
The rate of rotation when using a gamepad.
◆ RotationEitherThumbstick
bool OVRPlayerController.RotationEitherThumbstick = false |
Rotation defaults to secondary thumbstick. You can allow either here. Note that this won't behave well if EnableLinearMovement is true.
◆ RotationRatchet
float OVRPlayerController.RotationRatchet = 45.0f |
The rate of rotation when using the keyboard.
◆ SnapRotation
bool OVRPlayerController.SnapRotation = true |
The player will rotate in fixed steps if Snap Rotation is enabled.
◆ Teleported
bool OVRPlayerController.Teleported |
This bool is set to true whenever the player controller has been teleported. It is reset after every frame. Some systems, such as CharacterCameraConstraint, test this boolean in order to disable logic that moves the character controller immediately following the teleport.
◆ useProfileData
bool OVRPlayerController.useProfileData = true |
◆ InitialYRotation
float OVRPlayerController.InitialYRotation |
|
get |
◆ CameraUpdated
Action OVRPlayerController.CameraUpdated |
This event is raised immediately after the camera transform has been updated, but before movement is updated.
◆ PreCharacterMove
Action OVRPlayerController.PreCharacterMove |
This event is raised right before the character controller is actually moved in order to provide other systems the opportunity to move the character controller in response to things other than user input, such as movement of the HMD. See CharacterCameraConstraint.cs for an example of this.
◆ TransformUpdated
Action<Transform> OVRPlayerController.TransformUpdated |
This event is raised after the character controller is moved. This is used by the OVRAvatarLocomotion script to keep the avatar transform synchronized with the OVRPlayerController.
The documentation for this class was generated from the following file: