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

Keep track of all grabbables within this trigger. More...

Inheritance diagram for BNG.GrabbablesInTrigger:

Public Member Functions

virtual Grabbable GetClosestGrabbable (Dictionary< Collider, Grabbable > grabbables, bool remoteOnly=false, bool raycastCheck=false)
 
virtual bool CheckObjectBetweenGrabbable (Vector3 startingPosition, Grabbable theGrabbable)
 Check if there is an object / collision between the starting transform (our Grabber) and the grabbable object.
 
Dictionary< Collider, GrabbableGetValidGrabbables (Dictionary< Collider, Grabbable > grabs)
 
virtual Dictionary< Collider, GrabbableSanitizeGrabbables (Dictionary< Collider, Grabbable > grabs)
 
virtual void AddNearbyGrabbable (Collider col, Grabbable grabObject)
 
virtual void RemoveNearbyGrabbable (Collider col, Grabbable grabObject)
 
virtual void RemoveNearbyGrabbable (Grabbable grabObject)
 
virtual void AddValidRemoteGrabbable (Collider col, Grabbable grabObject)
 
virtual void RemoveValidRemoteGrabbable (Collider col, Grabbable grabObject)
 

Public Attributes

Dictionary< Collider, GrabbableNearbyGrabbables
 All grabbables in trigger that are considered valid.
 
Dictionary< Collider, GrabbableValidGrabbables
 All nearby Grabbables that are considered valid. I.e. Not being held, within range, etc.
 
Grabbable ClosestGrabbable
 The closest valid grabbable. If grab button is pressed this is the object that will be grabbed.
 
Dictionary< Collider, GrabbableValidRemoteGrabbables
 All grabbables in trigger that are considered valid.
 
Grabbable ClosestRemoteGrabbable
 Closest Valid Remote Grabbable may be highlighted.
 
bool FireGrabbableEvents = true
 Should we call events on grabbables.
 
bool RaycastRemoteGrabbables = false
 If true, Grabbables in the trigger will only be considered valid if no objects are in the way between it and this transform.
 
bool RemoteGrabbablesMustBeVisible = false
 If true, Remote Grabbables must not have any collisions between the Main Camera and the Remote Grabbable we are trying to reach. This can help prevent grabbing items through walls or around corners.
 
LayerMask RemoteCollisionLayers = 1
 If RaycastRemoteGrabbables is true, use these layers to detect collisions between the grabber and the potential grabbable object. By Default only looking for collisions on the "Default" layer.
 

Protected Member Functions

virtual bool isValidGrabbable (Collider col, Grabbable grab)
 

Detailed Description

Keep track of all grabbables within this trigger.

Member Function Documentation

◆ AddNearbyGrabbable()

virtual void BNG.GrabbablesInTrigger.AddNearbyGrabbable ( Collider  col,
Grabbable  grabObject 
)
virtual

◆ AddValidRemoteGrabbable()

virtual void BNG.GrabbablesInTrigger.AddValidRemoteGrabbable ( Collider  col,
Grabbable  grabObject 
)
virtual

◆ CheckObjectBetweenGrabbable()

virtual bool BNG.GrabbablesInTrigger.CheckObjectBetweenGrabbable ( Vector3  startingPosition,
Grabbable  theGrabbable 
)
virtual

Check if there is an object / collision between the starting transform (our Grabber) and the grabbable object.


Returns
True if there is an object between the starting position and the grabbable position

◆ GetClosestGrabbable()

virtual Grabbable BNG.GrabbablesInTrigger.GetClosestGrabbable ( Dictionary< Collider, Grabbable grabbables,
bool  remoteOnly = false,
bool  raycastCheck = false 
)
virtual

◆ GetValidGrabbables()

Dictionary< Collider, Grabbable > BNG.GrabbablesInTrigger.GetValidGrabbables ( Dictionary< Collider, Grabbable grabs)

◆ isValidGrabbable()

virtual bool BNG.GrabbablesInTrigger.isValidGrabbable ( Collider  col,
Grabbable  grab 
)
protectedvirtual

◆ RemoveNearbyGrabbable() [1/2]

virtual void BNG.GrabbablesInTrigger.RemoveNearbyGrabbable ( Collider  col,
Grabbable  grabObject 
)
virtual

◆ RemoveNearbyGrabbable() [2/2]

virtual void BNG.GrabbablesInTrigger.RemoveNearbyGrabbable ( Grabbable  grabObject)
virtual

◆ RemoveValidRemoteGrabbable()

virtual void BNG.GrabbablesInTrigger.RemoveValidRemoteGrabbable ( Collider  col,
Grabbable  grabObject 
)
virtual

◆ SanitizeGrabbables()

virtual Dictionary< Collider, Grabbable > BNG.GrabbablesInTrigger.SanitizeGrabbables ( Dictionary< Collider, Grabbable grabs)
virtual

Member Data Documentation

◆ ClosestGrabbable

Grabbable BNG.GrabbablesInTrigger.ClosestGrabbable

The closest valid grabbable. If grab button is pressed this is the object that will be grabbed.

◆ ClosestRemoteGrabbable

Grabbable BNG.GrabbablesInTrigger.ClosestRemoteGrabbable

Closest Valid Remote Grabbable may be highlighted.

◆ FireGrabbableEvents

bool BNG.GrabbablesInTrigger.FireGrabbableEvents = true

Should we call events on grabbables.

◆ NearbyGrabbables

Dictionary<Collider, Grabbable> BNG.GrabbablesInTrigger.NearbyGrabbables

All grabbables in trigger that are considered valid.

◆ RaycastRemoteGrabbables

bool BNG.GrabbablesInTrigger.RaycastRemoteGrabbables = false

If true, Grabbables in the trigger will only be considered valid if no objects are in the way between it and this transform.

◆ RemoteCollisionLayers

LayerMask BNG.GrabbablesInTrigger.RemoteCollisionLayers = 1

If RaycastRemoteGrabbables is true, use these layers to detect collisions between the grabber and the potential grabbable object. By Default only looking for collisions on the "Default" layer.

◆ RemoteGrabbablesMustBeVisible

bool BNG.GrabbablesInTrigger.RemoteGrabbablesMustBeVisible = false

If true, Remote Grabbables must not have any collisions between the Main Camera and the Remote Grabbable we are trying to reach. This can help prevent grabbing items through walls or around corners.

◆ ValidGrabbables

Dictionary<Collider, Grabbable> BNG.GrabbablesInTrigger.ValidGrabbables

All nearby Grabbables that are considered valid. I.e. Not being held, within range, etc.

◆ ValidRemoteGrabbables

Dictionary<Collider, Grabbable> BNG.GrabbablesInTrigger.ValidRemoteGrabbables

All grabbables in trigger that are considered valid.


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