Show / Hide Table of Contents

Class HVRTeleportCollisonHandler

Handles moving hands and the objects they are holding after a teleport with post collision handling behaviours.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
HVRTeleportCollisonHandler
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
[RequireComponent(typeof(HVRTeleporter))]
public class HVRTeleportCollisonHandler : MonoBehaviour

Fields

| Improve this Doc View Source

AfterTeleportOption

BoundingBoxSweep: Uses bounding box of all grabbable colliders to to find a safe position between the controller and the ResetTarget transform. DisableCollision: Disables the held object's collision until it's free and clear, releasing the object is prevented until clear.

Declaration
[Tooltip("Post teleport collision handling")]
public AfterTeleportOptions AfterTeleportOption
Field Value
Type Description
AfterTeleportOptions
| Improve this Doc View Source

BackoutIncrement

After the hand sweeps from the ResetTarget toward the desired target, the hand will back out when holding an object until it's clear. This defines the amount of each backout incremenet before checking the next Physics.Overlap

Declaration
[Tooltip("When backing out held objects, how granular should each move be when checking for overlap.")]
public float BackoutIncrement
Field Value
Type Description
System.Single
| Improve this Doc View Source

GrabbableStuck

Invoked if a held object is overlapping colliders after a teleport when DisableCollision is chosen.

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

GrabbableUnstuck

Invoked once a previously stuck object is clear.

Declaration
public GrabbableStuck GrabbableUnstuck
Field Value
Type Description
GrabbableStuck
| Improve this Doc View Source

LayerMask

After teleporting, checks are used against these layers to determine if hand's and held objects are stuck and need to be backed out safely.

Declaration
[Tooltip("Layers that hands and objects can hit after a teleport.")]
public LayerMask LayerMask
Field Value
Type Description
UnityEngine.LayerMask
| Improve this Doc View Source

LeftHand

The Left HVRHandGrabber component.

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

LeftJointHand

The Left Physics Hand component.

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

LeftTrackers

Declaration
public List<GrabbableCollisionTracker> LeftTrackers
Field Value
Type Description
System.Collections.Generic.List<GrabbableCollisionTracker>
| Improve this Doc View Source

ResetTarget

This tranform's position is used as the starting point to safely move the hand toward's the controller after a teleport.

Declaration
[Header("Required Objects")]
[Tooltip("After teleporting, the hand will start at this position and sweep towards the final hand destination")]
public Transform ResetTarget
Field Value
Type Description
UnityEngine.Transform
| Improve this Doc View Source

RightHand

The Right HVRHandGrabber component.

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

RightJointHand

The Right Physics Hand component.

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

RightTrackers

Declaration
public List<GrabbableCollisionTracker> RightTrackers
Field Value
Type Description
System.Collections.Generic.List<GrabbableCollisionTracker>
| Improve this Doc View Source

StuckTime

Used when AfterTeleportOption is set to DisableCollision, this amount of time must be past after a teleport before checking if the object is stuck.

Declaration
[Tooltip("Time required after teleporting to invoke stuck / unstuck events")]
public float StuckTime
Field Value
Type Description
System.Single
| Improve this Doc View Source

VerboseDebug

Drops gizmos lines of the post teleport sweep and bounding box positions to debug issues with collision handling

Declaration
[Header("Debugging")]
public bool VerboseDebug
Field Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

AfterFixedUpdate()

Declaration
protected virtual IEnumerator AfterFixedUpdate()
Returns
Type Description
System.Collections.IEnumerator
| Improve this Doc View Source

AfterTeleport()

Call after a teleport sequence has completed. Post teleport collision behaviour sequence will execute.

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

BeforeTeleport(Vector3)

Called before teleporting to snapshot the hand and held object state, and the position of the player

Declaration
public virtual void BeforeTeleport(Vector3 position)
Parameters
Type Name Description
UnityEngine.Vector3 position

Player controller position before teleporting

| Improve this Doc View Source

FixedUpdate()

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

IgnoreCollider(Collider, HVRHandGrabber, HVRGrabbable)

Determine if the provided collider should be ignored when doing an overlap check.

Declaration
protected virtual bool IgnoreCollider(Collider c, HVRHandGrabber hand, HVRGrabbable grabbable)
Parameters
Type Name Description
UnityEngine.Collider c
HVRHandGrabber hand
HVRGrabbable grabbable

The grabbable that is being tested for overlapping other geometry

Returns
Type Description
System.Boolean

Returns true if the provided collider should be ignored

| Improve this Doc View Source

PostTeleportSweep(HVRHandGrabber, HVRGrabbable, Vector3)

Handles sweeping the hand and grabbable after a teleport sequence.

Declaration
protected virtual void PostTeleportSweep(HVRHandGrabber hand, HVRGrabbable g, Vector3 backoutDirection)
Parameters
Type Name Description
HVRHandGrabber hand
HVRGrabbable g
UnityEngine.Vector3 backoutDirection

Direction to reverse the grabbable if it's overlapping something after teleporting.

| Improve this Doc View Source

Start()

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

Sweep(HVRHandGrabber)

Sweeps the hand and held grabbable from the ResetTarget towards the hand's current position, then backs out in the opposite direction until clear.

Declaration
public virtual void Sweep(HVRHandGrabber hand)
Parameters
Type Name Description
HVRHandGrabber hand
| Improve this Doc View Source

Sweep(HVRHandGrabber, Vector3)

Sweeps the hand and held grabbable from the ResetTarget towards the target position, then backs out in the opposite direction until clear.

Declaration
public virtual void Sweep(HVRHandGrabber hand, Vector3 target)
Parameters
Type Name Description
HVRHandGrabber hand
UnityEngine.Vector3 target

Position that the hand will sweep toward.

| Improve this Doc View Source

SweepHand(HVRHandGrabber, HVRGrabbable, Vector3)

Sweeps the hand and grabbable from the ResetTarget towards the target position, then backs out in the opposite direction until clear.

Declaration
protected virtual void SweepHand(HVRHandGrabber hand, HVRGrabbable g, Vector3 target)
Parameters
Type Name Description
HVRHandGrabber hand
HVRGrabbable g
UnityEngine.Vector3 target

Position that the hand will sweep toward.

| Improve this Doc View Source

SweepHand(HVRHandGrabber, Vector3)

Sweeps the hand from the ResetTarget towards the target position, then backs out in the opposite direction until clear.

Declaration
protected virtual void SweepHand(HVRHandGrabber hand, Vector3 target)
Parameters
Type Name Description
HVRHandGrabber hand
UnityEngine.Vector3 target

Position that the hand will sweep toward.

| Improve this Doc View Source

TeleportUpdate(Vector3)

Call while a teleport is in progress.

Declaration
public virtual void TeleportUpdate(Vector3 position)
Parameters
Type Name Description
UnityEngine.Vector3 position

Player controller updated position

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