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

An example bow item. Configurable force and damage. More...

Inheritance diagram for BNG.Bow:
BNG.GrabbableEvents

Public Member Functions

virtual void ResetBowAlignment ()
 
void GrabArrow (Arrow arrow)
 
void ReleaseArrow ()
 
override void OnRelease ()
 Has been dropped from the Grabber.
 
- Public Member Functions inherited from BNG.GrabbableEvents
virtual void OnGrab (Grabber grabber)
 Item has been grabbed by a Grabber.
 
virtual void OnRelease ()
 Has been dropped from the Grabber.
 
virtual void OnBecomesClosestGrabbable (ControllerHand touchingHand)
 Called if this is the closest grabbable but wasn't in the previous frame.
 
virtual void OnBecomesClosestGrabbable (Grabber touchingGrabber)
 Called if this is the closest grabbable but wasn't in the previous frame.
 
virtual void OnNoLongerClosestGrabbable (ControllerHand touchingHand)
 No longer closest grabbable. May need to disable highlight, ring, etc.
 
virtual void OnNoLongerClosestGrabbable (Grabber touchingGrabber)
 No longer closest grabbable. May need to disable highlight, ring, etc.
 
virtual void OnBecomesClosestRemoteGrabbable (ControllerHand touchingHand)
 Fires if this is the closest remote grabbable but wasn't in the previous frame.
 
virtual void OnBecomesClosestRemoteGrabbable (Grabber theGrabber)
 Fires if this is the closest remote grabbable but wasn't in the previous frame.
 
virtual void OnNoLongerClosestRemoteGrabbable (ControllerHand touchingHand)
 Fires if this was the closest remote grabbable last frame, but not this frame.
 
virtual void OnNoLongerClosestRemoteGrabbable (Grabber theGrabber)
 Fires if this was the closest remote grabbable last frame, but not this frame.
 
virtual void OnGrip (float gripValue)
 Amount of Grip (0-1). Only fired if object is being held.
 
virtual void OnTrigger (float triggerValue)
 Amount of Trigger being held down on the grabbed items controller. Only fired if object is being held.
 
virtual void OnTriggerDown ()
 Fires if trigger was pressed down on this controller this frame, but was not pressed last frame. Only fired if object is being held.
 
virtual void OnTriggerUp ()
 Fires if Trigger is not held down this frame.
 
virtual void OnButton1 ()
 Button 1 is being held down this frame but not last Oculus : Button 1 = "A" if held in Right controller."X" if held in Left Controller.
 
virtual void OnButton1Down ()
 Button 1 Pressed down this frame Oculus : Button 1 = "A" if held in Right controller."X" if held in Left Controller.
 
virtual void OnButton1Up ()
 Button 1 Released this frame Oculus : Button 1 = "A" if held in Right controller."X" if held in Left Controller.
 
virtual void OnButton2 ()
 Button 2 is being held down this frame but not last Oculus : Button 2 = "B" if held in Right controller."Y" if held in Left Controller.
 
virtual void OnButton2Down ()
 Button 2 Pressed down this frame Oculus : Button 2 = "B" if held in Right controller."Y" if held in Left Controller.
 
virtual void OnButton2Up ()
 Button 2 Released this frame Oculus : Button 2 = "B" if held in Right controller."Y" if held in Left Controller.
 
virtual void OnSnapZoneEnter ()
 Grabbable has been successfully inserted into a SnapZone.
 
virtual void OnSnapZoneExit ()
 Grabbable has been removed from a SnapZone.
 

Public Attributes

float BowForce = 50f
 How much force to apply to the arrow, multiplied by how far back the bow is pulled.
 
bool AlignBowToArrow = true
 
Transform BowModel
 
Transform ArrowRest
 
bool CanGrabArrowFromKnock = true
 If true, the player can grab a new arrow by holding the trigger down near the knock

 
string ArrowPrefabName = "Arrow2"
 
Transform ArrowRestLeftHanded
 
Transform ArrowKnock
 
bool IgnoreXPosition = false
 
bool IgnoreYPosition = false
 
bool AllowNegativeZ = true
 
bool CanGrabArrow = false
 
Grabber ClosestGrabber
 
Arrow GrabbedArrow
 
Grabber arrowGrabber
 
Vector3 LastValidPosition
 
float MaxStringDistance = 0.3f
 
float StringDistance = 0
 
Text PercentageUI
 
Vector3 BowUp = Vector3.forward
 
float AlignBowSpeed = 20f
 

Protected Member Functions

virtual void alignArrow ()
 
virtual void alignBow ()
 
- Protected Member Functions inherited from BNG.GrabbableEvents
virtual void Awake ()
 

Properties

float DrawPercent = 0 [get]
 

Additional Inherited Members

- Protected Attributes inherited from BNG.GrabbableEvents
Grabbable grab
 
Grabber thisGrabber
 
InputBridge input
 

Detailed Description

An example bow item. Configurable force and damage.

Member Function Documentation

◆ alignArrow()

virtual void BNG.Bow.alignArrow ( )
protectedvirtual

◆ alignBow()

virtual void BNG.Bow.alignBow ( )
protectedvirtual

◆ GrabArrow()

void BNG.Bow.GrabArrow ( Arrow  arrow)

◆ OnRelease()

override void BNG.Bow.OnRelease ( )
virtual

Has been dropped from the Grabber.

Reimplemented from BNG.GrabbableEvents.

◆ ReleaseArrow()

void BNG.Bow.ReleaseArrow ( )

◆ ResetBowAlignment()

virtual void BNG.Bow.ResetBowAlignment ( )
virtual

Member Data Documentation

◆ AlignBowSpeed

float BNG.Bow.AlignBowSpeed = 20f

◆ AlignBowToArrow

bool BNG.Bow.AlignBowToArrow = true

◆ AllowNegativeZ

bool BNG.Bow.AllowNegativeZ = true

◆ arrowGrabber

Grabber BNG.Bow.arrowGrabber

◆ ArrowKnock

Transform BNG.Bow.ArrowKnock

◆ ArrowPrefabName

string BNG.Bow.ArrowPrefabName = "Arrow2"

◆ ArrowRest

Transform BNG.Bow.ArrowRest

◆ ArrowRestLeftHanded

Transform BNG.Bow.ArrowRestLeftHanded

◆ BowForce

float BNG.Bow.BowForce = 50f

How much force to apply to the arrow, multiplied by how far back the bow is pulled.

◆ BowModel

Transform BNG.Bow.BowModel

◆ BowUp

Vector3 BNG.Bow.BowUp = Vector3.forward

◆ CanGrabArrow

bool BNG.Bow.CanGrabArrow = false

◆ CanGrabArrowFromKnock

bool BNG.Bow.CanGrabArrowFromKnock = true

If true, the player can grab a new arrow by holding the trigger down near the knock

◆ ClosestGrabber

Grabber BNG.Bow.ClosestGrabber

◆ GrabbedArrow

Arrow BNG.Bow.GrabbedArrow

◆ IgnoreXPosition

bool BNG.Bow.IgnoreXPosition = false

◆ IgnoreYPosition

bool BNG.Bow.IgnoreYPosition = false

◆ LastValidPosition

Vector3 BNG.Bow.LastValidPosition

◆ MaxStringDistance

float BNG.Bow.MaxStringDistance = 0.3f

◆ PercentageUI

Text BNG.Bow.PercentageUI

◆ StringDistance

float BNG.Bow.StringDistance = 0

Property Documentation

◆ DrawPercent

float BNG.Bow.DrawPercent = 0
get

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