VR Interaction Framework  1.0
A vr framework for the Oculus Quest
BNG.Grabber Class Reference

A trigger collider that handles grabbing grabbables. More...

Inheritance diagram for BNG.Grabber:

Public Member Functions

void GrabGrabbable (Grabbable item)
 
void HideHandGraphics ()
 
void ResetHandGraphics ()
 
Vector3 GetGrabberVelocity ()
 
Vector3 GetGrabberAveragedVelocity ()
 
Vector3 GetGrabberAveragedAngularVelocity ()
 
Vector3 GetGrabberAngularVelocity ()
 
void AddValidGrabbable (Grabbable grabObject)
 
void RemoveValidGrabbable (Grabbable grabObject)
 
void AddValidRemoteGrabbable (Grabbable grabObject)
 
void RemoveValidRemoteGrabbable (Grabbable grabObject)
 

Public Attributes

ControllerHand HandSide = ControllerHand.Left
 Which controller side. More...
 
float GripAmount = 0.9f
 0-1 determine how much to consider a grip. More...
 
float ReleaseGripAmount = 0.1f
 How much grip considered to release an object (0-1) More...
 
Grabbable HeldGrabbable
 The Grabbable we are currently holding. More...
 
List< GrabbableValidGrabbables = new List<Grabbable>()
 All nearby Grabbables that are considered valid. More...
 
Grabbable closestGrabbable
 The closest valid grabbable. More...
 
List< GrabbableValidRemoteGrabbables = new List<Grabbable>()
 All grabbables in trigger that are considered valid More...
 
Grabbable closestRemoteGrabbable
 Closest Valid Remote Grabbable may be highlighted More...
 
Transform HandsGraphics
 We may want to hide these while holding certain objects More...
 
bool ForceGrab = false
 For Testing More...
 
Vector3 PreviousPosition
 
Transform DummyTransform
 

Properties

bool HoldingItem [get]
 Are we currently holding any valid items? More...
 

Detailed Description

A trigger collider that handles grabbing grabbables.

Member Function Documentation

◆ AddValidGrabbable()

void BNG.Grabber.AddValidGrabbable ( Grabbable  grabObject)

◆ AddValidRemoteGrabbable()

void BNG.Grabber.AddValidRemoteGrabbable ( Grabbable  grabObject)

◆ GetGrabberAngularVelocity()

Vector3 BNG.Grabber.GetGrabberAngularVelocity ( )

◆ GetGrabberAveragedAngularVelocity()

Vector3 BNG.Grabber.GetGrabberAveragedAngularVelocity ( )

◆ GetGrabberAveragedVelocity()

Vector3 BNG.Grabber.GetGrabberAveragedVelocity ( )

◆ GetGrabberVelocity()

Vector3 BNG.Grabber.GetGrabberVelocity ( )

◆ GrabGrabbable()

void BNG.Grabber.GrabGrabbable ( Grabbable  item)

◆ HideHandGraphics()

void BNG.Grabber.HideHandGraphics ( )

◆ RemoveValidGrabbable()

void BNG.Grabber.RemoveValidGrabbable ( Grabbable  grabObject)

◆ RemoveValidRemoteGrabbable()

void BNG.Grabber.RemoveValidRemoteGrabbable ( Grabbable  grabObject)

◆ ResetHandGraphics()

void BNG.Grabber.ResetHandGraphics ( )

Member Data Documentation

◆ closestGrabbable

Grabbable BNG.Grabber.closestGrabbable

The closest valid grabbable.

If grab button is pressed this is the object that will be grabbed.

◆ closestRemoteGrabbable

Grabbable BNG.Grabber.closestRemoteGrabbable

Closest Valid Remote Grabbable may be highlighted

◆ DummyTransform

Transform BNG.Grabber.DummyTransform

◆ ForceGrab

bool BNG.Grabber.ForceGrab = false

For Testing

◆ GripAmount

float BNG.Grabber.GripAmount = 0.9f

0-1 determine how much to consider a grip.

Example : 0.75 is holding the grip down 3/4 of the way

◆ HandsGraphics

Transform BNG.Grabber.HandsGraphics

We may want to hide these while holding certain objects

◆ HandSide

ControllerHand BNG.Grabber.HandSide = ControllerHand.Left

Which controller side.

None if not attached to a controller.

◆ HeldGrabbable

Grabbable BNG.Grabber.HeldGrabbable

The Grabbable we are currently holding.

Null if not holding anything.

◆ PreviousPosition

Vector3 BNG.Grabber.PreviousPosition

◆ ReleaseGripAmount

float BNG.Grabber.ReleaseGripAmount = 0.1f

How much grip considered to release an object (0-1)

◆ ValidGrabbables

List<Grabbable> BNG.Grabber.ValidGrabbables = new List<Grabbable>()

All nearby Grabbables that are considered valid.

I.e. Not being held, within range, etc.

◆ ValidRemoteGrabbables

List<Grabbable> BNG.Grabber.ValidRemoteGrabbables = new List<Grabbable>()

All grabbables in trigger that are considered valid

Property Documentation

◆ HoldingItem

bool BNG.Grabber.HoldingItem
get

Are we currently holding any valid items?


The documentation for this class was generated from the following file: