C# Class VRHand

Inheritance: Grabber
Datei anzeigen Open project: adamhleslie/MorningRitual-GlobalGameJam2016 Class Usage Examples

Public Properties

Property Type Description
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

Public Methods

Method Description
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

Private Methods

Method Description
CleanUpAttachedObjectStack ( ) : void
InitController ( int index ) : void
Start ( ) : IEnumerator
VRHandDebugLog ( string msg ) : void

Method Details

AttachObject() public method

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.
return void

Awake() public method

public Awake ( ) : void
return void

DestroyAttachedObjects() public method

public DestroyAttachedObjects ( ) : void
return void

DetachObject() public method

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
return void

GetAttachmentTransform() public method

public GetAttachmentTransform ( string attachmentPoint = "" ) : Transform
attachmentPoint string
return Transform

GetStandardInteractionButton() public method

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
return bool

GetStandardInteractionButtonDown() public method

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
return bool

GetStandardInteractionButtonUp() public method

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
return bool

GetTrackedObjectAngularVelocity() public method

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
return Vector3

GetTrackedObjectVelocity() public method

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
return Vector3

GuessCurrentHandType() public method

Guess the type of this VRHand.
public GuessCurrentHandType ( ) : HandType
return HandType

HoverLock() public method

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.
return void

HoverUnlock() public method

Stop hovering over this object indefinitely.
public HoverUnlock ( VRInteractable interactable ) : void
interactable VRInteractable The hover-locked VRInteractable to stop hovering over indefinitely.
return void

OnDisable() public method

public OnDisable ( ) : void
return void

OnDrawGizmos() public method

public OnDrawGizmos ( ) : void
return void

OnEnable() public method

public OnEnable ( ) : void
return void

Update() public method

public Update ( ) : void
return void

UpdateDebugText() public method

public UpdateDebugText ( ) : void
return void

UpdateHovering() public method

public UpdateHovering ( ) : void
return void

UpdateNoSteamVRFallback() public method

public UpdateNoSteamVRFallback ( ) : void
return void

Property Details

controller public_oe property

public SteamVR_Controller.Device, controller
return SteamVR_Controller.Device,

createRenderModel public_oe property

public bool createRenderModel
return bool

hoverLayerMask public_oe property

public LayerMask hoverLayerMask
return LayerMask

hoverSphereRadius public_oe property

public float hoverSphereRadius
return float

hoverSphereTransform public_oe property

public Transform hoverSphereTransform
return Transform

hoverUpdateInterval public_oe property

public float hoverUpdateInterval
return float

noSteamVRFallbackCamera public_oe property

public Camera noSteamVRFallbackCamera
return Camera

otherHand public_oe property

public VRHand, otherHand
return VRHand,

showDebugText public_oe property

public bool showDebugText
return bool

showRenderModel public_oe property

public bool showRenderModel
return bool

spewDebugText public_oe property

public bool spewDebugText
return bool

startingHandType public_oe property

public HandType startingHandType
return HandType