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

Weapon slide on a pistol. Charges weapon and ejects casings. More...

Inheritance diagram for BNG.WeaponSlide:

Public Member Functions

virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void LockBack ()
 
virtual void UnlockBack ()
 
virtual void LockSlidePosition ()
 
virtual void UnlockSlidePosition ()
 
IEnumerator UnlockSlideRoutine ()
 

Public Attributes

float MinLocalZ = -0.03f
 Minimum distance slide will travel on Z axis.
 
float MaxLocalZ = 0
 Max distance slide will travel on Z axis.
 
bool LockedBack = false
 Is the Slide locked back due to last shot.
 
AudioClip SlideReleaseSound
 Sound to play when slide is released back into position.
 
AudioClip LockedBackSound
 Sound to play after last shot has fired and slide is forced back.
 
bool ZeroMassWhenNotHeld = true
 When true, the slide will be set to 0 mass when not being held. This fixes jitter caused by the slide having a configurable joint attached to the weapon.
 

Detailed Description

Weapon slide on a pistol. Charges weapon and ejects casings.

Member Function Documentation

◆ LockBack()

virtual void BNG.WeaponSlide.LockBack ( )
virtual

◆ LockSlidePosition()

virtual void BNG.WeaponSlide.LockSlidePosition ( )
virtual

◆ OnDisable()

virtual void BNG.WeaponSlide.OnDisable ( )
virtual

◆ OnEnable()

virtual void BNG.WeaponSlide.OnEnable ( )
virtual

◆ UnlockBack()

virtual void BNG.WeaponSlide.UnlockBack ( )
virtual

◆ UnlockSlidePosition()

virtual void BNG.WeaponSlide.UnlockSlidePosition ( )
virtual

◆ UnlockSlideRoutine()

IEnumerator BNG.WeaponSlide.UnlockSlideRoutine ( )

Member Data Documentation

◆ LockedBack

bool BNG.WeaponSlide.LockedBack = false

Is the Slide locked back due to last shot.

◆ LockedBackSound

AudioClip BNG.WeaponSlide.LockedBackSound

Sound to play after last shot has fired and slide is forced back.

◆ MaxLocalZ

float BNG.WeaponSlide.MaxLocalZ = 0

Max distance slide will travel on Z axis.

◆ MinLocalZ

float BNG.WeaponSlide.MinLocalZ = -0.03f

Minimum distance slide will travel on Z axis.

◆ SlideReleaseSound

AudioClip BNG.WeaponSlide.SlideReleaseSound

Sound to play when slide is released back into position.

◆ ZeroMassWhenNotHeld

bool BNG.WeaponSlide.ZeroMassWhenNotHeld = true

When true, the slide will be set to 0 mass when not being held. This fixes jitter caused by the slide having a configurable joint attached to the weapon.


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