|
VR Interaction Framework
1.0
A vr framework for the Oculus Quest
|
An example weapon script. More...
Public Member Functions | |
| override void | OnTrigger (float triggerValue) |
| Amount of Trigger being held down on the grabbed items controller. More... | |
| void | Shoot () |
| void | EjectCasing () |
Public Member Functions inherited from BNG.GrabbableEvents | |
| virtual void | OnGrab (Grabber grabber) |
| Item has been grabbed by a Grabber More... | |
| virtual void | OnRelease () |
| Has been dropped from the Grabber More... | |
| virtual void | OnBecomesClosestGrabbable (ControllerHand touchingHand) |
| Called if this is the closest grabbable but wasn't in the previous frame More... | |
| virtual void | OnNoLongerClosestGrabbable (ControllerHand touchingHand) |
| No longer closest grabbable. More... | |
| virtual void | OnBecomesClosestRemoteGrabbable (ControllerHand touchingHand) |
| Fires if this is the closest remote grabbable but wasn't in the previous frame More... | |
| virtual void | OnNoLongerClosestRemoteGrabbable (ControllerHand touchingHand) |
| Fires if this was the closest remote grabbable last frame, but not this frame More... | |
| virtual void | OnGrip (float gripValue) |
| Amount of Grip (0-1). More... | |
| virtual void | OnTriggerDown () |
| Fires if trigger was pressed down on this controller this frame. More... | |
| virtual void | OnTriggerUp () |
| Fires if trigger was released on this controller this frame. More... | |
| virtual void | OnButton1 () |
| Button 1 is being held down this frame but not last Oculus : Button 1 = "A" if held in Right controller. More... | |
| virtual void | OnButton1Down () |
| Button 1 Pressed down this frame Oculus : Button 1 = "A" if held in Right controller. More... | |
| virtual void | OnButton1Up () |
| Button 1 Released this frame Oculus : Button 1 = "A" if held in Right controller. More... | |
| virtual void | OnButton2 () |
| Button 2 is being held down this frame but not last Oculus : Button 2 = "B" if held in Right controller. More... | |
| virtual void | OnButton2Down () |
| Button 2 Pressed down this frame Oculus : Button 2 = "B" if held in Right controller. More... | |
| virtual void | OnButton2Up () |
| Button 2 Released this frame Oculus : Button 2 = "B" if held in Right controller. More... | |
Public Attributes | |
| float | MaxRange = 25f |
| float | Damage = 25f |
| FiringType | FiringMethod = FiringType.Semi |
| float | FiringRate = 0.2f |
| Ex : 0.2 = 5 Shots per second More... | |
| Vector3 | RecoilForce = Vector3.zero |
| How much force to apply to the tip of the barrel More... | |
| LayerMask | ValidLayers |
| Transform | TriggerTransform |
| Transform | SlideTransform |
| Transform | MuzzlePointTransform |
| Transform | EjectPointTransform |
| GameObject | MuzzleFlashObject |
| GameObject | BulletPrefab |
| GameObject | BulletCasingPrefab |
| GameObject | ProjectilePrefab |
| GameObject | HitFXPrefab |
| AudioClip | GunShotSound |
| AudioClip | EmptySound |
| float | SlideDistance = -0.028f |
| float | ShotForce = 10f |
| float | slideSpeed = 50f |
| float | minSlideDistance = 0.001f |
Additional Inherited Members | |
Protected Attributes inherited from BNG.GrabbableEvents | |
| Grabbable | grab |
| Grabber | thisGrabber |
| InputBridge | input |
An example weapon script.
A more configurable Raycast weapon will be available later.
| void BNG.Pistol.EjectCasing | ( | ) |
|
virtual |
Amount of Trigger being held down on the grabbed items controller.
Only fired if object is being held.
| triggerValue | 0 - 1 Open / Closed |
Reimplemented from BNG.GrabbableEvents.
| void BNG.Pistol.Shoot | ( | ) |
| GameObject BNG.Pistol.BulletCasingPrefab |
| GameObject BNG.Pistol.BulletPrefab |
| float BNG.Pistol.Damage = 25f |
| Transform BNG.Pistol.EjectPointTransform |
| AudioClip BNG.Pistol.EmptySound |
| FiringType BNG.Pistol.FiringMethod = FiringType.Semi |
| float BNG.Pistol.FiringRate = 0.2f |
Ex : 0.2 = 5 Shots per second
| AudioClip BNG.Pistol.GunShotSound |
| GameObject BNG.Pistol.HitFXPrefab |
| float BNG.Pistol.MaxRange = 25f |
| float BNG.Pistol.minSlideDistance = 0.001f |
| GameObject BNG.Pistol.MuzzleFlashObject |
| Transform BNG.Pistol.MuzzlePointTransform |
| GameObject BNG.Pistol.ProjectilePrefab |
| Vector3 BNG.Pistol.RecoilForce = Vector3.zero |
How much force to apply to the tip of the barrel
| float BNG.Pistol.ShotForce = 10f |
| float BNG.Pistol.SlideDistance = -0.028f |
| float BNG.Pistol.slideSpeed = 50f |
| Transform BNG.Pistol.SlideTransform |
| Transform BNG.Pistol.TriggerTransform |
| LayerMask BNG.Pistol.ValidLayers |