C# Класс VRHand

Наследование: Grabber
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
controller SteamVR_Controller.Device,
createRenderModel bool
hoverLayerMask LayerMask
hoverSphereRadius float
hoverSphereTransform Transform
hoverUpdateInterval float
noSteamVRFallbackCamera Camera
otherHand VRHand,
showDebugText bool
showRenderModel bool
spewDebugText bool
startingHandType HandType

Открытые методы

Метод Описание
AttachObject ( GameObject objectToAttach, AttachmentFlags flags = defaultAttachmentFlags, string attachmentPoint = "" ) : void

Attach a GameObject to this GameObject.

Awake ( ) : void
DestroyAttachedObjects ( ) : void
DetachObject ( GameObject objectToDetach, bool restoreOriginalParent = true ) : void

Detach this GameObject from the attached object stack of this VRHand.

GetAttachmentTransform ( string attachmentPoint = "" ) : Transform
GetStandardInteractionButton ( ) : bool

Is the standard interaction button being pressed? In VR, this is a trigger press. In 2D fallback, this is a mouse left-click.

GetStandardInteractionButtonDown ( ) : bool

Was the standard interaction button just pressed? In VR, this is a trigger press. In 2D fallback, this is a mouse left-click.

GetStandardInteractionButtonUp ( ) : bool

Was the standard interaction button just released? In VR, this is a trigger press. In 2D fallback, this is a mouse left-click.

GetTrackedObjectAngularVelocity ( ) : Vector3

Get the world angular velocity of the VR Hand. Note: controller velocity value only updates on controller events (Button but and down) so good for throwing

GetTrackedObjectVelocity ( ) : Vector3

Get the world velocity of the VR Hand. Note: controller velocity value only updates on controller events (Button but and down) so good for throwing

GuessCurrentHandType ( ) : HandType

Guess the type of this VRHand.

HoverLock ( VRInteractable interactable ) : void

Continue to hover over this object indefinitely, whether or not the VRHand moves out of its interaction trigger volume.

HoverUnlock ( VRInteractable interactable ) : void

Stop hovering over this object indefinitely.

OnDisable ( ) : void
OnDrawGizmos ( ) : void
OnEnable ( ) : void
Update ( ) : void
UpdateDebugText ( ) : void
UpdateHovering ( ) : void
UpdateNoSteamVRFallback ( ) : void

Приватные методы

Метод Описание
CleanUpAttachedObjectStack ( ) : void
InitController ( int index ) : void
Start ( ) : IEnumerator
VRHandDebugLog ( string msg ) : void

Описание методов

AttachObject() публичный Метод

Attach a GameObject to this GameObject.
public AttachObject ( GameObject objectToAttach, AttachmentFlags flags = defaultAttachmentFlags, string attachmentPoint = "" ) : void
objectToAttach GameObject The GameObject to attach.
flags AttachmentFlags The flags to use for attaching the object.
attachmentPoint string Name of the GameObject in the hierarchy of this VRHand which should act as the attachment point for this GameObject.
Результат void

Awake() публичный Метод

public Awake ( ) : void
Результат void

DestroyAttachedObjects() публичный Метод

public DestroyAttachedObjects ( ) : void
Результат void

DetachObject() публичный Метод

Detach this GameObject from the attached object stack of this VRHand.
public DetachObject ( GameObject objectToDetach, bool restoreOriginalParent = true ) : void
objectToDetach GameObject The GameObject to detach from this VRHand
restoreOriginalParent bool
Результат void

GetAttachmentTransform() публичный Метод

public GetAttachmentTransform ( string attachmentPoint = "" ) : Transform
attachmentPoint string
Результат Transform

GetStandardInteractionButton() публичный Метод

Is the standard interaction button being pressed? In VR, this is a trigger press. In 2D fallback, this is a mouse left-click.
public GetStandardInteractionButton ( ) : bool
Результат bool

GetStandardInteractionButtonDown() публичный Метод

Was the standard interaction button just pressed? In VR, this is a trigger press. In 2D fallback, this is a mouse left-click.
public GetStandardInteractionButtonDown ( ) : bool
Результат bool

GetStandardInteractionButtonUp() публичный Метод

Was the standard interaction button just released? In VR, this is a trigger press. In 2D fallback, this is a mouse left-click.
public GetStandardInteractionButtonUp ( ) : bool
Результат bool

GetTrackedObjectAngularVelocity() публичный Метод

Get the world angular velocity of the VR Hand. Note: controller velocity value only updates on controller events (Button but and down) so good for throwing
public GetTrackedObjectAngularVelocity ( ) : Vector3
Результат Vector3

GetTrackedObjectVelocity() публичный Метод

Get the world velocity of the VR Hand. Note: controller velocity value only updates on controller events (Button but and down) so good for throwing
public GetTrackedObjectVelocity ( ) : Vector3
Результат Vector3

GuessCurrentHandType() публичный Метод

Guess the type of this VRHand.
public GuessCurrentHandType ( ) : HandType
Результат HandType

HoverLock() публичный Метод

Continue to hover over this object indefinitely, whether or not the VRHand moves out of its interaction trigger volume.
public HoverLock ( VRInteractable interactable ) : void
interactable VRInteractable The VRInteractable to hover over indefinitely.
Результат void

HoverUnlock() публичный Метод

Stop hovering over this object indefinitely.
public HoverUnlock ( VRInteractable interactable ) : void
interactable VRInteractable The hover-locked VRInteractable to stop hovering over indefinitely.
Результат void

OnDisable() публичный Метод

public OnDisable ( ) : void
Результат void

OnDrawGizmos() публичный Метод

public OnDrawGizmos ( ) : void
Результат void

OnEnable() публичный Метод

public OnEnable ( ) : void
Результат void

Update() публичный Метод

public Update ( ) : void
Результат void

UpdateDebugText() публичный Метод

public UpdateDebugText ( ) : void
Результат void

UpdateHovering() публичный Метод

public UpdateHovering ( ) : void
Результат void

UpdateNoSteamVRFallback() публичный Метод

public UpdateNoSteamVRFallback ( ) : void
Результат void

Описание свойств

controller публичное свойство

public SteamVR_Controller.Device, controller
Результат SteamVR_Controller.Device,

createRenderModel публичное свойство

public bool createRenderModel
Результат bool

hoverLayerMask публичное свойство

public LayerMask hoverLayerMask
Результат LayerMask

hoverSphereRadius публичное свойство

public float hoverSphereRadius
Результат float

hoverSphereTransform публичное свойство

public Transform hoverSphereTransform
Результат Transform

hoverUpdateInterval публичное свойство

public float hoverUpdateInterval
Результат float

noSteamVRFallbackCamera публичное свойство

public Camera noSteamVRFallbackCamera
Результат Camera

otherHand публичное свойство

public VRHand, otherHand
Результат VRHand,

showDebugText публичное свойство

public bool showDebugText
Результат bool

showRenderModel публичное свойство

public bool showRenderModel
Результат bool

spewDebugText публичное свойство

public bool spewDebugText
Результат bool

startingHandType публичное свойство

public HandType startingHandType
Результат HandType