Show / Hide Table of Contents

Class HVRPlayerController

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
HVRPlayerController
Inherited Members
UnityEngine.MonoBehaviour.IsInvoking()
UnityEngine.MonoBehaviour.CancelInvoke()
UnityEngine.MonoBehaviour.Invoke(System.String, System.Single)
UnityEngine.MonoBehaviour.InvokeRepeating(System.String, System.Single, System.Single)
UnityEngine.MonoBehaviour.CancelInvoke(System.String)
UnityEngine.MonoBehaviour.IsInvoking(System.String)
UnityEngine.MonoBehaviour.StartCoroutine(System.String)
UnityEngine.MonoBehaviour.StartCoroutine(System.String, System.Object)
UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StartCoroutine_Auto(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StopCoroutine(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StopCoroutine(UnityEngine.Coroutine)
UnityEngine.MonoBehaviour.StopCoroutine(System.String)
UnityEngine.MonoBehaviour.StopAllCoroutines()
UnityEngine.MonoBehaviour.print(System.Object)
UnityEngine.MonoBehaviour.useGUILayout
UnityEngine.MonoBehaviour.runInEditMode
UnityEngine.Behaviour.enabled
UnityEngine.Behaviour.isActiveAndEnabled
UnityEngine.Component.GetComponent(System.Type)
UnityEngine.Component.GetComponent<T>()
UnityEngine.Component.TryGetComponent(System.Type, UnityEngine.Component)
UnityEngine.Component.TryGetComponent<T>(T)
UnityEngine.Component.GetComponent(System.String)
UnityEngine.Component.GetComponentInChildren(System.Type, System.Boolean)
UnityEngine.Component.GetComponentInChildren(System.Type)
UnityEngine.Component.GetComponentInChildren<T>(System.Boolean)
UnityEngine.Component.GetComponentInChildren<T>()
UnityEngine.Component.GetComponentsInChildren(System.Type, System.Boolean)
UnityEngine.Component.GetComponentsInChildren(System.Type)
UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean)
UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean, System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentsInChildren<T>()
UnityEngine.Component.GetComponentsInChildren<T>(System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentInParent(System.Type)
UnityEngine.Component.GetComponentInParent<T>()
UnityEngine.Component.GetComponentsInParent(System.Type, System.Boolean)
UnityEngine.Component.GetComponentsInParent(System.Type)
UnityEngine.Component.GetComponentsInParent<T>(System.Boolean)
UnityEngine.Component.GetComponentsInParent<T>(System.Boolean, System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentsInParent<T>()
UnityEngine.Component.GetComponents(System.Type)
UnityEngine.Component.GetComponents(System.Type, System.Collections.Generic.List<UnityEngine.Component>)
UnityEngine.Component.GetComponents<T>(System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponents<T>()
UnityEngine.Component.CompareTag(System.String)
UnityEngine.Component.SendMessageUpwards(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessageUpwards(System.String, System.Object)
UnityEngine.Component.SendMessageUpwards(System.String)
UnityEngine.Component.SendMessageUpwards(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessage(System.String, System.Object)
UnityEngine.Component.SendMessage(System.String)
UnityEngine.Component.SendMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessage(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.BroadcastMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.BroadcastMessage(System.String, System.Object)
UnityEngine.Component.BroadcastMessage(System.String)
UnityEngine.Component.BroadcastMessage(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.transform
UnityEngine.Component.gameObject
UnityEngine.Component.tag
UnityEngine.Object.GetInstanceID()
UnityEngine.Object.GetHashCode()
UnityEngine.Object.Equals(System.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
UnityEngine.Object.Instantiate<T>(T)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
UnityEngine.Object.Destroy(UnityEngine.Object)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
UnityEngine.Object.FindObjectsOfType(System.Type)
UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
UnityEngine.Object.DestroyObject(UnityEngine.Object)
UnityEngine.Object.FindSceneObjectsOfType(System.Type)
UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
UnityEngine.Object.FindObjectsOfType<T>()
UnityEngine.Object.FindObjectOfType<T>()
UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
UnityEngine.Object.FindObjectOfType(System.Type)
UnityEngine.Object.ToString()
UnityEngine.Object.name
UnityEngine.Object.hideFlags
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: HurricaneVR.Framework.Core.Player
Assembly: HurricaneVR.Framework.dll
Syntax
public class HVRPlayerController : MonoBehaviour

Fields

| Improve this Doc View Source

Acceleration

Declaration
[Tooltip("Walking speed in m/s.")]
public float Acceleration
Field Value
Type Description
System.Single
| Improve this Doc View Source

Camera

Declaration
[Header("Transforms")]
public Transform Camera
Field Value
Type Description
UnityEngine.Transform
| Improve this Doc View Source

CameraRig

Declaration
[Header("Components")]
public HVRCameraRig CameraRig
Field Value
Type Description
HVRCameraRig
| Improve this Doc View Source

CanCrouch

Declaration
public bool CanCrouch
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

CanJump

Declaration
[Header("Settings")]
public bool CanJump
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

CanSprint

Declaration
public bool CanSprint
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

CanSteerWhileJumping

Declaration
public bool CanSteerWhileJumping
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

CrouchHeight

Declaration
[Tooltip("Player height after toggling a crouch via controller.")]
public float CrouchHeight
Field Value
Type Description
System.Single
| Improve this Doc View Source

CrouchMinHeight

Declaration
[Header("Crouching")]
[Tooltip("Player height must be above this to toggle crouch.")]
public float CrouchMinHeight
Field Value
Type Description
System.Single
| Improve this Doc View Source

CrouchSpeed

Declaration
[Tooltip("Speed at which toggle crouch moves the player up and down.")]
public float CrouchSpeed
Field Value
Type Description
System.Single
| Improve this Doc View Source

Deacceleration

Declaration
public float Deacceleration
Field Value
Type Description
System.Single
| Improve this Doc View Source

DirectionStyle

Declaration
public PlayerDirectionMode DirectionStyle
Field Value
Type Description
PlayerDirectionMode
| Improve this Doc View Source

DoubleClickThreshold

Declaration
[Tooltip("Double click timeout for sprinting.")]
public float DoubleClickThreshold
Field Value
Type Description
System.Single
| Improve this Doc View Source

FadeFromLean

Declaration
[Tooltip("Screen fades when leaning to far into something.")]
public bool FadeFromLean
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

FloorOffset

Declaration
public Transform FloorOffset
Field Value
Type Description
UnityEngine.Transform
| Improve this Doc View Source

Gravity

Declaration
public float Gravity
Field Value
Type Description
System.Single
| Improve this Doc View Source

GroundedDistance

Declaration
public float GroundedDistance
Field Value
Type Description
System.Single
| Improve this Doc View Source

GroundedLayerMask

Declaration
public LayerMask GroundedLayerMask
Field Value
Type Description
UnityEngine.LayerMask
| Improve this Doc View Source

HeadCollision

Declaration
[Header("Head Collision")]
public HVRHeadCollision HeadCollision
Field Value
Type Description
HVRHeadCollision
| Improve this Doc View Source

HeadCollisionFadeSpeed

Declaration
public float HeadCollisionFadeSpeed
Field Value
Type Description
System.Single
| Improve this Doc View Source

HeadCollisionPushesBack

Declaration
[Tooltip("If true, when your head collides it returns your head to the body's position")]
public bool HeadCollisionPushesBack
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

InitialHMDAdjustment

Declaration
[Tooltip("If true the player will ignore the first HMD movement on detection. If the HMD is not centered the player would move away from it's placed position to where the HMD is.")]
public bool InitialHMDAdjustment
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

InstantAcceleration

Declaration
[Header("Locomotion")]
public bool InstantAcceleration
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

IsGrounded

Declaration
public bool IsGrounded
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

JumpVelocity

Declaration
public float JumpVelocity
Field Value
Type Description
System.Single
| Improve this Doc View Source

LeftControllerTransform

Declaration
public Transform LeftControllerTransform
Field Value
Type Description
UnityEngine.Transform
| Improve this Doc View Source

LeftHand

Declaration
public HVRHandGrabber LeftHand
Field Value
Type Description
HVRHandGrabber
| Improve this Doc View Source

LeftJointHand

Declaration
public HVRJointHand LeftJointHand
Field Value
Type Description
HVRJointHand
| Improve this Doc View Source

LimitHeadDistance

Declaration
[Tooltip("If true, limits the head distance from the body by MaxLean amount.")]
public bool LimitHeadDistance
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

MaxFallSpeed

Declaration
public float MaxFallSpeed
Field Value
Type Description
System.Single
| Improve this Doc View Source

MaxLean

Declaration
[Tooltip("If LimitHeadDistance is true, the max distance your head can be from your body.")]
public float MaxLean
Field Value
Type Description
System.Single
| Improve this Doc View Source

MinHeight

Declaration
[Tooltip("Minimum Player Capsule Height.")]
public float MinHeight
Field Value
Type Description
System.Single
| Improve this Doc View Source

MouseSensitivityX

Declaration
public float MouseSensitivityX
Field Value
Type Description
System.Single
| Improve this Doc View Source

MouseTurning

Declaration
[Header("Debugging")]
public bool MouseTurning
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

MoveSpeed

Declaration
public float MoveSpeed
Field Value
Type Description
System.Single
| Improve this Doc View Source

NeckPivot

Declaration
public Transform NeckPivot
Field Value
Type Description
UnityEngine.Transform
| Improve this Doc View Source

RightControllerTransform

Declaration
public Transform RightControllerTransform
Field Value
Type Description
UnityEngine.Transform
| Improve this Doc View Source

RightHand

Declaration
public HVRHandGrabber RightHand
Field Value
Type Description
HVRHandGrabber
| Improve this Doc View Source

RightJointHand

Declaration
public HVRJointHand RightJointHand
Field Value
Type Description
HVRJointHand
| Improve this Doc View Source

Root

Declaration
public Transform Root
Field Value
Type Description
UnityEngine.Transform
| Improve this Doc View Source

RotateWhileTeleportAiming

Declaration
[Tooltip("If true you can turn the player while aiming the teleporter, false by default")]
public bool RotateWhileTeleportAiming
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

RotationType

Declaration
[Header("Turning")]
public RotationType RotationType
Field Value
Type Description
RotationType
| Improve this Doc View Source

RunSpeed

Declaration
[Tooltip("Sprinting speed in m/s.")]
public float RunSpeed
Field Value
Type Description
System.Single
| Improve this Doc View Source

ScreenFader

Declaration
public HVRScreenFade ScreenFader
Field Value
Type Description
HVRScreenFade
| Improve this Doc View Source

SmoothTurnSpeed

Declaration
public float SmoothTurnSpeed
Field Value
Type Description
System.Single
| Improve this Doc View Source

SmoothTurnThreshold

Declaration
public float SmoothTurnThreshold
Field Value
Type Description
System.Single
| Improve this Doc View Source

SnapAmount

Declaration
public float SnapAmount
Field Value
Type Description
System.Single
| Improve this Doc View Source

SnapThreshold

Declaration
[Tooltip("Axis threshold to be considered valid for snap turning.")]
public float SnapThreshold
Field Value
Type Description
System.Single
| Improve this Doc View Source

SprintAcceleration

Declaration
public float SprintAcceleration
Field Value
Type Description
System.Single

Properties

| Improve this Doc View Source

CameraHeight

Declaration
public virtual float CameraHeight { get; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

CharacterController

Declaration
public CharacterController CharacterController { get; }
Property Value
Type Description
UnityEngine.CharacterController
| Improve this Doc View Source

Inputs

Declaration
public HVRPlayerInputs Inputs { get; }
Property Value
Type Description
HVRPlayerInputs
| Improve this Doc View Source

IsClimbing

Declaration
public bool IsClimbing { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsCrouching

Declaration
public bool IsCrouching { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

MovementEnabled

Declaration
public bool MovementEnabled { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Neck

Declaration
public Transform Neck { get; }
Property Value
Type Description
UnityEngine.Transform
| Improve this Doc View Source

PreviousPosition

Declaration
public Vector3 PreviousPosition { get; protected set; }
Property Value
Type Description
UnityEngine.Vector3
| Improve this Doc View Source

RigidBody

Declaration
public Rigidbody RigidBody { get; }
Property Value
Type Description
UnityEngine.Rigidbody
| Improve this Doc View Source

RotationEnabled

Declaration
public bool RotationEnabled { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Sprinting

Declaration
public bool Sprinting { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Teleporter

Declaration
public HVRTeleporter Teleporter { get; }
Property Value
Type Description
HVRTeleporter

Methods

| Improve this Doc View Source

AdjustHandAcceleration()

Declaration
protected virtual void AdjustHandAcceleration()
| Improve this Doc View Source

Awake()

Declaration
protected virtual void Awake()
| Improve this Doc View Source

CanRotate()

Declaration
protected virtual bool CanRotate()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

CheckCameraMovement()

Declaration
protected virtual void CheckCameraMovement()
| Improve this Doc View Source

CheckCrouching()

Declaration
protected virtual void CheckCrouching()
| Improve this Doc View Source

CheckGrounded()

Declaration
protected virtual void CheckGrounded()
| Improve this Doc View Source

CheckLean()

Declaration
protected virtual void CheckLean()
| Improve this Doc View Source

CheckSprinting()

Declaration
protected virtual void CheckSprinting()
| Improve this Doc View Source

Crouch()

Declaration
protected virtual void Crouch()
| Improve this Doc View Source

FaceDirection(Vector3)

Declaration
public void FaceDirection(Vector3 forward)
Parameters
Type Name Description
UnityEngine.Vector3 forward
| Improve this Doc View Source

FixedUpdate()

Declaration
protected virtual void FixedUpdate()
| Improve this Doc View Source

GetMovementAxis()

Declaration
protected virtual Vector2 GetMovementAxis()
Returns
Type Description
UnityEngine.Vector2
| Improve this Doc View Source

GetMovementDirection(out Vector3, out Vector3)

Declaration
protected virtual void GetMovementDirection(out Vector3 forwards, out Vector3 right)
Parameters
Type Name Description
UnityEngine.Vector3 forwards
UnityEngine.Vector3 right
| Improve this Doc View Source

GetTurnAxis()

Declaration
protected virtual Vector2 GetTurnAxis()
Returns
Type Description
UnityEngine.Vector2
| Improve this Doc View Source

HandleClimbing()

Declaration
protected virtual void HandleClimbing()
| Improve this Doc View Source

HandleHMDMovement()

Declaration
protected virtual void HandleHMDMovement()
| Improve this Doc View Source

HandleHorizontalMovement()

Declaration
protected virtual void HandleHorizontalMovement()
| Improve this Doc View Source

HandleMovement()

Declaration
protected virtual void HandleMovement()
| Improve this Doc View Source

HandleRotation()

Declaration
protected virtual void HandleRotation()
| Improve this Doc View Source

HandleSmoothRotation()

Declaration
protected virtual void HandleSmoothRotation()
| Improve this Doc View Source

HandleSnapRotation()

Declaration
protected virtual void HandleSnapRotation()
| Improve this Doc View Source

HandleVerticalMovement()

Declaration
protected virtual void HandleVerticalMovement()
| Improve this Doc View Source

HandlMouseRotation()

Declaration
protected virtual void HandlMouseRotation()
| Improve this Doc View Source

IgnoreCollision(IEnumerable<Collider>)

Declaration
public virtual void IgnoreCollision(IEnumerable<Collider> colliders)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<UnityEngine.Collider> colliders
| Improve this Doc View Source

RemoveMultiplayerComponents()

Removes components not necessary on other players rigs

Declaration
public void RemoveMultiplayerComponents()
| Improve this Doc View Source

Reset()

Declaration
public virtual void Reset()
| Improve this Doc View Source

SetSmoothTurnSpeed(Single)

Declaration
public void SetSmoothTurnSpeed(float speed)
Parameters
Type Name Description
System.Single speed
| Improve this Doc View Source

SetSnapAmount(Single)

Declaration
public void SetSnapAmount(float snapAmount)
Parameters
Type Name Description
System.Single snapAmount
| Improve this Doc View Source

SetTurnType(RotationType)

Declaration
public void SetTurnType(RotationType rotationType)
Parameters
Type Name Description
RotationType rotationType
| Improve this Doc View Source

Start()

Declaration
protected virtual void Start()
| Improve this Doc View Source

StopCrouching()

Declaration
protected virtual void StopCrouching()
| Improve this Doc View Source

Update()

Declaration
protected virtual void Update()
| Improve this Doc View Source

UpdateHeight()

Declaration
protected virtual void UpdateHeight()

Extension Methods

HVRUtilities.GetRelativeValues(Component, Transform, out Vector3, out Quaternion)
HVRUtilities.GetRelativeValues(Component, Component, out Vector3, out Quaternion)
HVRUtilities.GetRelativeRotation(Component, Quaternion)
VRUtilities.GetRigidbody(MonoBehaviour)
VRUtilities.GetCopyOf<T>(Component, T)
CoroutineExtensions.ExecuteNextUpdate(MonoBehaviour, Action)
CoroutineExtensions.ExecuteAfterSeconds(MonoBehaviour, Action, Single)
CoroutineExtensions.ExecuteAfterSecondsUnscaled(MonoBehaviour, Action, Single)
CoroutineExtensions.ExecuteAfterFixedUpdate(MonoBehaviour, Action)
CoroutineExtensions.ExecuteAfterFixedUpdates(MonoBehaviour, Action, Int32)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX