VR Interaction Framework v2.0
Loading...
Searching...
No Matches
BNG.Grabber Class Reference

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

Inheritance diagram for BNG.Grabber:

Public Member Functions

virtual bool InputCheckGrab ()
 
virtual bool GetInputDownForGrabbable (Grabbable grabObject)
 
virtual GrabButton GetGrabButton (Grabbable grab)
 
virtual bool TryGrab ()
 
virtual void GrabGrabbable (Grabbable item)
 
virtual void DidDrop ()
 
virtual void HideHandGraphics ()
 
virtual void ResetHandGraphics ()
 
virtual void TryRelease ()
 
virtual Vector3 GetGrabberAveragedVelocity ()
 
virtual Vector3 GetGrabberAveragedAngularVelocity ()
 

Public Attributes

ControllerHand HandSide = ControllerHand.Left
 Which controller side. None if not attached to a controller.
 
HoldType DefaultHoldType = HoldType.HoldDown
 Which controller side. None if not attached to a controller.
 
GrabButton DefaultGrabButton = GrabButton.Grip
 The default grab button for all Grabbables. A Grabbable can manually override this default.
 
InputActionReference GrabAction
 
float 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
 
float ReleaseGripAmount = 0.5f
 How much grip considered to release an ob ect (0-1)
 
float GrabCheckSeconds = 0.5f
 How many seconds to check for grab input while Grip is held down. After grip is held down for this long, grip will need to be repressed in order to pick up an object.
 
Grabbable EquipGrabbableOnStart
 Assign a Grabbable here if you want to auto equip it on Start.
 
Transform HandsGraphics
 Root transform that holds hands models. We may want to hide these while holding certain objects.
 
Grabbable HeldGrabbable
 The Grabbable we are currently holding. Null if not holding anything.
 
bool ForceGrab = false
 Same as holding down grip if set to true. Should not have same value as ForceRelease.
 
bool ForceRelease = false
 Force the release of grip.
 
float LastDropTime
 
Vector3 PreviousPosition
 
Transform DummyTransform
 Can be used to position hands independently from model.
 
bool FreshGrip = true
 
GrabbableEvent onGrabEvent
 
GrabbableEvent onAfterGrabEvent
 
GrabbableEvent onReleaseEvent
 
VelocityTracker velocityTracker
 

Protected Member Functions

virtual void updateFreshGrabStatus ()
 
virtual bool inputCheckRelease ()
 
virtual float getGrabInput (GrabButton btn)
 
virtual bool getToggleInput (GrabButton btn)
 

Properties

bool HoldingItem [get]
 Are we currently holding any valid items?
 
bool RemoteGrabbingItem [get]
 Are we currently pulling a remote grabbable towards us?
 
GrabbablesInTrigger GrabsInTrigger [get]
 
Grabbable RemoteGrabbingGrabbable [get]
 Returns the Grabbable object if we are currenly remote grabbing an object.
 
Vector3 handsGraphicsGrabberOffset [get]
 
Vector3 handsGraphicsGrabberOffsetRotation [get]
 

Detailed Description

A trigger collider that handles grabbing grabbables.

Member Function Documentation

◆ DidDrop()

virtual void BNG.Grabber.DidDrop ( )
virtual

◆ GetGrabberAveragedAngularVelocity()

virtual Vector3 BNG.Grabber.GetGrabberAveragedAngularVelocity ( )
virtual

◆ GetGrabberAveragedVelocity()

virtual Vector3 BNG.Grabber.GetGrabberAveragedVelocity ( )
virtual

◆ GetGrabButton()

virtual GrabButton BNG.Grabber.GetGrabButton ( Grabbable  grab)
virtual

◆ getGrabInput()

virtual float BNG.Grabber.getGrabInput ( GrabButton  btn)
protectedvirtual

◆ GetInputDownForGrabbable()

virtual bool BNG.Grabber.GetInputDownForGrabbable ( Grabbable  grabObject)
virtual

◆ getToggleInput()

virtual bool BNG.Grabber.getToggleInput ( GrabButton  btn)
protectedvirtual

◆ GrabGrabbable()

virtual void BNG.Grabber.GrabGrabbable ( Grabbable  item)
virtual

◆ HideHandGraphics()

virtual void BNG.Grabber.HideHandGraphics ( )
virtual

◆ InputCheckGrab()

virtual bool BNG.Grabber.InputCheckGrab ( )
virtual

◆ inputCheckRelease()

virtual bool BNG.Grabber.inputCheckRelease ( )
protectedvirtual

◆ ResetHandGraphics()

virtual void BNG.Grabber.ResetHandGraphics ( )
virtual

◆ TryGrab()

virtual bool BNG.Grabber.TryGrab ( )
virtual

◆ TryRelease()

virtual void BNG.Grabber.TryRelease ( )
virtual

◆ updateFreshGrabStatus()

virtual void BNG.Grabber.updateFreshGrabStatus ( )
protectedvirtual

Member Data Documentation

◆ DefaultGrabButton

GrabButton BNG.Grabber.DefaultGrabButton = GrabButton.Grip

The default grab button for all Grabbables. A Grabbable can manually override this default.

◆ DefaultHoldType

HoldType BNG.Grabber.DefaultHoldType = HoldType.HoldDown

Which controller side. None if not attached to a controller.

◆ DummyTransform

Transform BNG.Grabber.DummyTransform

Can be used to position hands independently from model.

◆ EquipGrabbableOnStart

Grabbable BNG.Grabber.EquipGrabbableOnStart

Assign a Grabbable here if you want to auto equip it on Start.

◆ ForceGrab

bool BNG.Grabber.ForceGrab = false

Same as holding down grip if set to true. Should not have same value as ForceRelease.

◆ ForceRelease

bool BNG.Grabber.ForceRelease = false

Force the release of grip.

◆ FreshGrip

bool BNG.Grabber.FreshGrip = true

◆ GrabAction

InputActionReference BNG.Grabber.GrabAction

◆ GrabCheckSeconds

float BNG.Grabber.GrabCheckSeconds = 0.5f

How many seconds to check for grab input while Grip is held down. After grip is held down for this long, grip will need to be repressed in order to pick up an object.

◆ 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

Root transform that holds hands models. 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.

◆ LastDropTime

float BNG.Grabber.LastDropTime

◆ onAfterGrabEvent

GrabbableEvent BNG.Grabber.onAfterGrabEvent

◆ onGrabEvent

GrabbableEvent BNG.Grabber.onGrabEvent

◆ onReleaseEvent

GrabbableEvent BNG.Grabber.onReleaseEvent

◆ PreviousPosition

Vector3 BNG.Grabber.PreviousPosition

◆ ReleaseGripAmount

float BNG.Grabber.ReleaseGripAmount = 0.5f

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

◆ velocityTracker

VelocityTracker BNG.Grabber.velocityTracker

Property Documentation

◆ GrabsInTrigger

GrabbablesInTrigger BNG.Grabber.GrabsInTrigger
get

◆ handsGraphicsGrabberOffset

Vector3 BNG.Grabber.handsGraphicsGrabberOffset
get

◆ handsGraphicsGrabberOffsetRotation

Vector3 BNG.Grabber.handsGraphicsGrabberOffsetRotation
get

◆ HoldingItem

bool BNG.Grabber.HoldingItem
get

Are we currently holding any valid items?

◆ RemoteGrabbingGrabbable

Grabbable BNG.Grabber.RemoteGrabbingGrabbable
get

Returns the Grabbable object if we are currenly remote grabbing an object.

◆ RemoteGrabbingItem

bool BNG.Grabber.RemoteGrabbingItem
get

Are we currently pulling a remote grabbable towards us?


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