Class HVRGrabberBase
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
HVRGrabberBase
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.Grabbers
Assembly: HurricaneVR.Framework.dll
Syntax
public abstract class HVRGrabberBase : MonoBehaviour
Fields
| Improve this Doc View Source_grabPoint
Declaration
protected Transform _grabPoint
Field Value
| Type | Description |
|---|---|
| UnityEngine.Transform |
BeforeGrabbed
Declaration
public VRGrabberEvent BeforeGrabbed
Field Value
| Type | Description |
|---|---|
| VRGrabberEvent |
BeforeHoverEnter
Declaration
public VRGrabberEvent BeforeHoverEnter
Field Value
| Type | Description |
|---|---|
| VRGrabberEvent |
GrabBags
Declaration
public List<HVRGrabbableBag> GrabBags
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<HVRGrabbableBag> |
Grabbed
Declaration
public VRGrabberEvent Grabbed
Field Value
| Type | Description |
|---|---|
| VRGrabberEvent |
HoverEnter
Declaration
public VRGrabberEvent HoverEnter
Field Value
| Type | Description |
|---|---|
| VRGrabberEvent |
HoverExit
Declaration
public VRGrabberEvent HoverExit
Field Value
| Type | Description |
|---|---|
| VRGrabberEvent |
Released
Declaration
public VRGrabberEvent Released
Field Value
| Type | Description |
|---|---|
| VRGrabberEvent |
Properties
| Improve this Doc View SourceAllowGrabbing
Declaration
public virtual bool AllowGrabbing { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AllowHovering
Declaration
public bool AllowHovering { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AllowSwap
Declaration
public virtual bool AllowSwap { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ControllerRotation
Declaration
public virtual Quaternion ControllerRotation { get; set; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Quaternion |
GrabbedTarget
Declaration
public HVRGrabbable GrabbedTarget { get; protected set; }
Property Value
| Type | Description |
|---|---|
| HVRGrabbable |
GrabPoint
Declaration
public virtual Transform GrabPoint { get; set; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Transform |
HoverTarget
Declaration
public HVRGrabbable HoverTarget { get; }
Property Value
| Type | Description |
|---|---|
| HVRGrabbable |
IsGrabActivated
Declaration
public virtual bool IsGrabActivated { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsGrabbing
Declaration
public bool IsGrabbing { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsHandGrabber
Declaration
public virtual bool IsHandGrabber { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsHoldActive
Declaration
public virtual bool IsHoldActive { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsHovering
Declaration
public bool IsHovering { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsMine
Declaration
public virtual bool IsMine { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsSocket
Declaration
public virtual bool IsSocket { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
JointAnchorWorldPosition
Declaration
public virtual Vector3 JointAnchorWorldPosition { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Vector3 |
PerformUpdate
Declaration
public virtual bool PerformUpdate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
PullingGrabbable
Declaration
public bool PullingGrabbable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Rigidbody
Declaration
public Rigidbody Rigidbody { get; protected set; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Rigidbody |
Methods
| Improve this Doc View SourceAwake()
Declaration
protected virtual void Awake()
CanGrab(HVRGrabbable)
Declaration
public virtual bool CanGrab(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
Returns
| Type | Description |
|---|---|
| System.Boolean |
CanHover(HVRGrabbable)
Declaration
public virtual bool CanHover(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
Returns
| Type | Description |
|---|---|
| System.Boolean |
CheckForLineOfSight(Vector3, HVRGrabbable, LayerMask, Single, Boolean)
Declaration
public bool CheckForLineOfSight(Vector3 rayOrigin, HVRGrabbable grabbable, LayerMask RaycastLayermask, float rayMaxDistance = 0.75F, bool useClosestPoint = true)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Vector3 | rayOrigin | |
| HVRGrabbable | grabbable | |
| UnityEngine.LayerMask | RaycastLayermask | |
| System.Single | rayMaxDistance | |
| System.Boolean | useClosestPoint |
Returns
| Type | Description |
|---|---|
| System.Boolean |
CheckGrab()
Declaration
protected virtual void CheckGrab()
CheckHover()
Declaration
protected virtual bool CheckHover()
Returns
| Type | Description |
|---|---|
| System.Boolean |
CheckRelease()
Declaration
protected virtual void CheckRelease()
CheckSwapRelease(HVRGrabbable)
Will check if this object should be released from it's primary grabber and release it if so.
Declaration
protected virtual void CheckSwapRelease(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
CheckSwapReleaseRequired(HVRGrabbable)
Returns true if this object should be released from it's existing grabber prior to be grabbed by another.
Declaration
protected virtual bool CheckSwapReleaseRequired(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
Returns
| Type | Description |
|---|---|
| System.Boolean |
CheckUnHover()
Declaration
protected virtual void CheckUnHover()
ClosestValidHover()
Declaration
protected HVRGrabbable ClosestValidHover()
Returns
| Type | Description |
|---|---|
| HVRGrabbable |
ClosestValidHover(Boolean)
Declaration
protected HVRGrabbable ClosestValidHover(bool triggerOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | triggerOnly |
Returns
| Type | Description |
|---|---|
| HVRGrabbable |
FixedUpdate()
Declaration
protected virtual void FixedUpdate()
ForceRelease()
Declaration
public virtual void ForceRelease()
GetClosestGrabbable()
Returns the closest grabbable in the grabbable bag.
Declaration
public virtual HVRGrabbable GetClosestGrabbable()
Returns
| Type | Description |
|---|---|
| HVRGrabbable |
GetClosestGrabbable(Predicate<HVRGrabbable>)
Returns the closest grabbable in the grabbable bag that satisfies canGrab delegate.
Declaration
public virtual HVRGrabbable GetClosestGrabbable(Predicate<HVRGrabbable> canGrab)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Predicate<HVRGrabbable> | canGrab |
Returns
| Type | Description |
|---|---|
| HVRGrabbable |
GrabGrabbable(HVRGrabberBase, HVRGrabbable, Boolean)
Declaration
protected virtual void GrabGrabbable(HVRGrabberBase grabber, HVRGrabbable grabbable, bool raiseEvents = true)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabberBase | grabber | |
| HVRGrabbable | grabbable | |
| System.Boolean | raiseEvents |
HoverGrabbable(HVRGrabberBase, HVRGrabbable)
Declaration
protected void HoverGrabbable(HVRGrabberBase grabber, HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabberBase | grabber | |
| HVRGrabbable | grabbable |
IsValidGrabbable(HVRGrabbable)
Declaration
public virtual bool IsValidGrabbable(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
Returns
| Type | Description |
|---|---|
| System.Boolean |
OnAfterGrabbed(HVRGrabbable)
Declaration
protected virtual void OnAfterGrabbed(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
OnAfterHover(HVRGrabbable)
Declaration
protected virtual void OnAfterHover(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
OnBeforeGrabbed(HVRGrabArgs)
Declaration
protected virtual void OnBeforeGrabbed(HVRGrabArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabArgs | args |
OnBeforeHover(HVRGrabbable)
Declaration
protected virtual void OnBeforeHover(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
OnDestroy()
Declaration
protected virtual void OnDestroy()
OnDisable()
Declaration
protected virtual void OnDisable()
OnEnable()
Declaration
protected virtual void OnEnable()
OnGrabbableDestroyed(HVRGrabbable)
Declaration
protected virtual void OnGrabbableDestroyed(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
OnGrabbed(HVRGrabArgs)
Declaration
protected virtual void OnGrabbed(HVRGrabArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabArgs | args |
OnHoverEnter(HVRGrabbable)
Declaration
protected virtual void OnHoverEnter(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
OnHoverExit(HVRGrabbable)
Declaration
protected virtual void OnHoverExit(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
OnReleased(HVRGrabbable)
Declaration
protected virtual void OnReleased(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
ReleaseGrabbable(HVRGrabberBase, HVRGrabbable, Boolean, Boolean)
Executes the release sequence on the provided grabber and grabbable.
Declaration
public static void ReleaseGrabbable(HVRGrabberBase grabber, HVRGrabbable grabbable, bool raiseEvents = true, bool isHandSwap = false)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabberBase | grabber | |
| HVRGrabbable | grabbable | |
| System.Boolean | raiseEvents | If true the Released Unity events on the grabber and grabbable will execute. |
| System.Boolean | isHandSwap |
Start()
Declaration
protected virtual void Start()
SwapRelease(HVRGrabbable)
Releases the grabbable from it's current grabber, this is prior to being grabbed by another grabber.
Declaration
protected virtual void SwapRelease(HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable |
TryGrab(HVRGrabbable, Boolean)
Declaration
public virtual bool TryGrab(HVRGrabbable grabbable, bool force = false)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable | |
| System.Boolean | force |
Returns
| Type | Description |
|---|---|
| System.Boolean |
TryGrabNoEvents(HVRGrabbable, Boolean)
Declaration
public virtual bool TryGrabNoEvents(HVRGrabbable grabbable, bool force = false)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabbable | grabbable | |
| System.Boolean | force |
Returns
| Type | Description |
|---|---|
| System.Boolean |
UnhoverGrabbable(HVRGrabberBase, HVRGrabbable)
Declaration
protected void UnhoverGrabbable(HVRGrabberBase grabber, HVRGrabbable grabbable)
Parameters
| Type | Name | Description |
|---|---|---|
| HVRGrabberBase | grabber | |
| HVRGrabbable | grabbable |
Update()
Declaration
protected virtual void Update()