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 SourceAcceleration
Declaration
[Tooltip("Walking speed in m/s.")]
public float Acceleration
Field Value
Type | Description |
---|---|
System.Single |
Camera
Declaration
[Header("Transforms")]
public Transform Camera
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
CameraRig
Declaration
[Header("Components")]
public HVRCameraRig CameraRig
Field Value
Type | Description |
---|---|
HVRCameraRig |
CanCrouch
Declaration
public bool CanCrouch
Field Value
Type | Description |
---|---|
System.Boolean |
CanJump
Declaration
[Header("Settings")]
public bool CanJump
Field Value
Type | Description |
---|---|
System.Boolean |
CanSprint
Declaration
public bool CanSprint
Field Value
Type | Description |
---|---|
System.Boolean |
CanSteerWhileJumping
Declaration
public bool CanSteerWhileJumping
Field Value
Type | Description |
---|---|
System.Boolean |
CrouchHeight
Declaration
[Tooltip("Player height after toggling a crouch via controller.")]
public float CrouchHeight
Field Value
Type | Description |
---|---|
System.Single |
CrouchMinHeight
Declaration
[Header("Crouching")]
[Tooltip("Player height must be above this to toggle crouch.")]
public float CrouchMinHeight
Field Value
Type | Description |
---|---|
System.Single |
CrouchSpeed
Declaration
[Tooltip("Speed at which toggle crouch moves the player up and down.")]
public float CrouchSpeed
Field Value
Type | Description |
---|---|
System.Single |
Deacceleration
Declaration
public float Deacceleration
Field Value
Type | Description |
---|---|
System.Single |
DirectionStyle
Declaration
public PlayerDirectionMode DirectionStyle
Field Value
Type | Description |
---|---|
PlayerDirectionMode |
DoubleClickThreshold
Declaration
[Tooltip("Double click timeout for sprinting.")]
public float DoubleClickThreshold
Field Value
Type | Description |
---|---|
System.Single |
FadeFromLean
Declaration
[Tooltip("Screen fades when leaning to far into something.")]
public bool FadeFromLean
Field Value
Type | Description |
---|---|
System.Boolean |
FloorOffset
Declaration
public Transform FloorOffset
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
Gravity
Declaration
public float Gravity
Field Value
Type | Description |
---|---|
System.Single |
GroundedDistance
Declaration
public float GroundedDistance
Field Value
Type | Description |
---|---|
System.Single |
GroundedLayerMask
Declaration
public LayerMask GroundedLayerMask
Field Value
Type | Description |
---|---|
UnityEngine.LayerMask |
HeadCollision
Declaration
[Header("Head Collision")]
public HVRHeadCollision HeadCollision
Field Value
Type | Description |
---|---|
HVRHeadCollision |
HeadCollisionFadeSpeed
Declaration
public float HeadCollisionFadeSpeed
Field Value
Type | Description |
---|---|
System.Single |
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 |
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 |
InstantAcceleration
Declaration
[Header("Locomotion")]
public bool InstantAcceleration
Field Value
Type | Description |
---|---|
System.Boolean |
IsGrounded
Declaration
public bool IsGrounded
Field Value
Type | Description |
---|---|
System.Boolean |
JumpVelocity
Declaration
public float JumpVelocity
Field Value
Type | Description |
---|---|
System.Single |
LeftControllerTransform
Declaration
public Transform LeftControllerTransform
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
LeftHand
Declaration
public HVRHandGrabber LeftHand
Field Value
Type | Description |
---|---|
HVRHandGrabber |
LeftJointHand
Declaration
public HVRJointHand LeftJointHand
Field Value
Type | Description |
---|---|
HVRJointHand |
LimitHeadDistance
Declaration
[Tooltip("If true, limits the head distance from the body by MaxLean amount.")]
public bool LimitHeadDistance
Field Value
Type | Description |
---|---|
System.Boolean |
MaxFallSpeed
Declaration
public float MaxFallSpeed
Field Value
Type | Description |
---|---|
System.Single |
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 |
MinHeight
Declaration
[Tooltip("Minimum Player Capsule Height.")]
public float MinHeight
Field Value
Type | Description |
---|---|
System.Single |
MouseSensitivityX
Declaration
public float MouseSensitivityX
Field Value
Type | Description |
---|---|
System.Single |
MouseTurning
Declaration
[Header("Debugging")]
public bool MouseTurning
Field Value
Type | Description |
---|---|
System.Boolean |
MoveSpeed
Declaration
public float MoveSpeed
Field Value
Type | Description |
---|---|
System.Single |
NeckPivot
Declaration
public Transform NeckPivot
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
RightControllerTransform
Declaration
public Transform RightControllerTransform
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
RightHand
Declaration
public HVRHandGrabber RightHand
Field Value
Type | Description |
---|---|
HVRHandGrabber |
RightJointHand
Declaration
public HVRJointHand RightJointHand
Field Value
Type | Description |
---|---|
HVRJointHand |
Root
Declaration
public Transform Root
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
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 |
RotationType
Declaration
[Header("Turning")]
public RotationType RotationType
Field Value
Type | Description |
---|---|
RotationType |
RunSpeed
Declaration
[Tooltip("Sprinting speed in m/s.")]
public float RunSpeed
Field Value
Type | Description |
---|---|
System.Single |
ScreenFader
Declaration
public HVRScreenFade ScreenFader
Field Value
Type | Description |
---|---|
HVRScreenFade |
SmoothTurnSpeed
Declaration
public float SmoothTurnSpeed
Field Value
Type | Description |
---|---|
System.Single |
SmoothTurnThreshold
Declaration
public float SmoothTurnThreshold
Field Value
Type | Description |
---|---|
System.Single |
SnapAmount
Declaration
public float SnapAmount
Field Value
Type | Description |
---|---|
System.Single |
SnapThreshold
Declaration
[Tooltip("Axis threshold to be considered valid for snap turning.")]
public float SnapThreshold
Field Value
Type | Description |
---|---|
System.Single |
SprintAcceleration
Declaration
public float SprintAcceleration
Field Value
Type | Description |
---|---|
System.Single |
Properties
| Improve this Doc View SourceCameraHeight
Declaration
public virtual float CameraHeight { get; }
Property Value
Type | Description |
---|---|
System.Single |
CharacterController
Declaration
public CharacterController CharacterController { get; }
Property Value
Type | Description |
---|---|
UnityEngine.CharacterController |
Inputs
Declaration
public HVRPlayerInputs Inputs { get; }
Property Value
Type | Description |
---|---|
HVRPlayerInputs |
IsClimbing
Declaration
public bool IsClimbing { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsCrouching
Declaration
public bool IsCrouching { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MovementEnabled
Declaration
public bool MovementEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Neck
Declaration
public Transform Neck { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Transform |
PreviousPosition
Declaration
public Vector3 PreviousPosition { get; protected set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
RigidBody
Declaration
public Rigidbody RigidBody { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Rigidbody |
RotationEnabled
Declaration
public bool RotationEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Sprinting
Declaration
public bool Sprinting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Teleporter
Declaration
public HVRTeleporter Teleporter { get; }
Property Value
Type | Description |
---|---|
HVRTeleporter |
Methods
| Improve this Doc View SourceAdjustHandAcceleration()
Declaration
protected virtual void AdjustHandAcceleration()
Awake()
Declaration
protected virtual void Awake()
CanRotate()
Declaration
protected virtual bool CanRotate()
Returns
Type | Description |
---|---|
System.Boolean |
CheckCameraMovement()
Declaration
protected virtual void CheckCameraMovement()
CheckCrouching()
Declaration
protected virtual void CheckCrouching()
CheckGrounded()
Declaration
protected virtual void CheckGrounded()
CheckLean()
Declaration
protected virtual void CheckLean()
CheckSprinting()
Declaration
protected virtual void CheckSprinting()
Crouch()
Declaration
protected virtual void Crouch()
FaceDirection(Vector3)
Declaration
public void FaceDirection(Vector3 forward)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | forward |
FixedUpdate()
Declaration
protected virtual void FixedUpdate()
GetMovementAxis()
Declaration
protected virtual Vector2 GetMovementAxis()
Returns
Type | Description |
---|---|
UnityEngine.Vector2 |
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 |
GetTurnAxis()
Declaration
protected virtual Vector2 GetTurnAxis()
Returns
Type | Description |
---|---|
UnityEngine.Vector2 |
HandleClimbing()
Declaration
protected virtual void HandleClimbing()
HandleHMDMovement()
Declaration
protected virtual void HandleHMDMovement()
HandleHorizontalMovement()
Declaration
protected virtual void HandleHorizontalMovement()
HandleMovement()
Declaration
protected virtual void HandleMovement()
HandleRotation()
Declaration
protected virtual void HandleRotation()
HandleSmoothRotation()
Declaration
protected virtual void HandleSmoothRotation()
HandleSnapRotation()
Declaration
protected virtual void HandleSnapRotation()
HandleVerticalMovement()
Declaration
protected virtual void HandleVerticalMovement()
HandlMouseRotation()
Declaration
protected virtual void HandlMouseRotation()
IgnoreCollision(IEnumerable<Collider>)
Declaration
public virtual void IgnoreCollision(IEnumerable<Collider> colliders)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<UnityEngine.Collider> | colliders |
RemoveMultiplayerComponents()
Removes components not necessary on other players rigs
Declaration
public void RemoveMultiplayerComponents()
Reset()
Declaration
public virtual void Reset()
SetSmoothTurnSpeed(Single)
Declaration
public void SetSmoothTurnSpeed(float speed)
Parameters
Type | Name | Description |
---|---|---|
System.Single | speed |
SetSnapAmount(Single)
Declaration
public void SetSnapAmount(float snapAmount)
Parameters
Type | Name | Description |
---|---|---|
System.Single | snapAmount |
SetTurnType(RotationType)
Declaration
public void SetTurnType(RotationType rotationType)
Parameters
Type | Name | Description |
---|---|---|
RotationType | rotationType |
Start()
Declaration
protected virtual void Start()
StopCrouching()
Declaration
protected virtual void StopCrouching()
Update()
Declaration
protected virtual void Update()
UpdateHeight()
Declaration
protected virtual void UpdateHeight()