Skip to main content Link Menu Expand (external link) Document Search Copy Copied

GRPLButtonInteractable Public class

Description

This is a Button interactible that can be used for both UI and Mesh based buttons. The base transform is the button base. The interact object is the button surface.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph Rhinox.XR.Grapple.It
  Rhinox.XR.Grapple.It.GRPLButtonInteractable[[GRPLButtonInteractable]]
  Rhinox.XR.Grapple.It.GRPLInteractable[[GRPLInteractable]]
  class Rhinox.XR.Grapple.It.GRPLInteractable abstractStyle;
  end
Rhinox.XR.Grapple.It.GRPLInteractable --> Rhinox.XR.Grapple.It.GRPLButtonInteractable

Members

Methods

Protected methods

Returns Name
void Initialize()
Used to initialize the button.
void InteractStopped()
Used to stop interaction with the button.
void OnDrawGizmos()
void ProximityStopped()
Used to stop proximity with the button.

Public methods

Returns Name
bool CheckForInteraction(RhinoxJoint joint, RhinoxHand hand)
Transform GetReferenceTransform()
bool ShouldInteractionCheckStop()
bool TryGetCurrentInteractJoint(ICollection<RhinoxJoint> joints, out RhinoxJoint outJoint, RhinoxHand hand)

Details

Summary

This is a Button interactible that can be used for both UI and Mesh based buttons. The base transform is the button base. The interact object is the button surface.

Remarks

The vector from the base to the surface should follow the local forward vector!

Inheritance

Constructors

GRPLButtonInteractable

public GRPLButtonInteractable()

Methods

Initialize

protected override void Initialize()
Summary

Used to initialize the button.

InteractStopped

protected override void InteractStopped()
Summary

Used to stop interaction with the button.

ProximityStopped

protected override void ProximityStopped()
Summary

Used to stop proximity with the button.

CheckForInteraction

public override bool CheckForInteraction(RhinoxJoint joint, RhinoxHand hand)
Arguments
Type Name Description
RhinoxJoint joint  
RhinoxHand hand  

TryGetCurrentInteractJoint

public override bool TryGetCurrentInteractJoint(ICollection<RhinoxJoint> joints, out RhinoxJoint outJoint, RhinoxHand hand)
Arguments
Type Name Description
ICollection<RhinoxJoint> joints  
out RhinoxJoint outJoint  
RhinoxHand hand  

ShouldInteractionCheckStop

public override bool ShouldInteractionCheckStop()

GetReferenceTransform

public override Transform GetReferenceTransform()

OnDrawGizmos

protected override void OnDrawGizmos()

Events

ButtonDown

public event Action<GRPLButtonInteractable> ButtonDown
Summary

An event that occurs when the button is pressed down. The event takes a GRPLButtonInteractable as a parameter.

ButtonUp

public event Action<GRPLButtonInteractable> ButtonUp
Summary

An event that occurs when the button is released. The event takes a GRPLButtonInteractable as a parameter.

ButtonPressed

public event Action<GRPLButtonInteractable> ButtonPressed
Summary

An event that occurs when the button is held down. The event takes a GRPLButtonInteractable as a parameter.

Generated with ModularDoc