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

Helper for joystick type physical inputs. More...

Inheritance diagram for BNG.JoystickControl:

Public Member Functions

virtual void OnJoystickChange (float leverX, float leverY)
 
virtual void OnJoystickChange (Vector2 joystickVector)
 

Public Attributes

float DeadZone = 0.001f
 
float MinDegrees = -45f
 Minimum angle the Level can be rotated.
 
float MaxDegrees = 45f
 Maximum angle the Level can be rotated.
 
float LeverPercentageX = 0
 Current Percentage of joystick on X axis (left / right)
 
float LeverPercentageY = 0
 Current Percentage of joystick on Y axis (forward / back)
 
Vector2 LeverVector
 
bool UseSmoothLook = true
 
float SmoothLookSpeed = 15f
 
bool KinematicWhileInactive = false
 If true, the joystick's rigidbody will be kinematic when not being held. Enable this if you don't want your joystick to interact with physics or if you need moving platform support.
 
FloatFloatEvent onJoystickChange
 Event called when Joystick value is changed.
 
Vector2Event onJoystickVectorChange
 Event called when Joystick value is changed.
 
float angleX
 
float angleY
 

Detailed Description

Helper for joystick type physical inputs.

Member Function Documentation

◆ OnJoystickChange() [1/2]

virtual void BNG.JoystickControl.OnJoystickChange ( float  leverX,
float  leverY 
)
virtual

◆ OnJoystickChange() [2/2]

virtual void BNG.JoystickControl.OnJoystickChange ( Vector2  joystickVector)
virtual

Member Data Documentation

◆ angleX

float BNG.JoystickControl.angleX

◆ angleY

float BNG.JoystickControl.angleY

◆ DeadZone

float BNG.JoystickControl.DeadZone = 0.001f

◆ KinematicWhileInactive

bool BNG.JoystickControl.KinematicWhileInactive = false

If true, the joystick's rigidbody will be kinematic when not being held. Enable this if you don't want your joystick to interact with physics or if you need moving platform support.

◆ LeverPercentageX

float BNG.JoystickControl.LeverPercentageX = 0

Current Percentage of joystick on X axis (left / right)

◆ LeverPercentageY

float BNG.JoystickControl.LeverPercentageY = 0

Current Percentage of joystick on Y axis (forward / back)

◆ LeverVector

Vector2 BNG.JoystickControl.LeverVector

◆ MaxDegrees

float BNG.JoystickControl.MaxDegrees = 45f

Maximum angle the Level can be rotated.

◆ MinDegrees

float BNG.JoystickControl.MinDegrees = -45f

Minimum angle the Level can be rotated.

◆ onJoystickChange

FloatFloatEvent BNG.JoystickControl.onJoystickChange

Event called when Joystick value is changed.

◆ onJoystickVectorChange

Vector2Event BNG.JoystickControl.onJoystickVectorChange

Event called when Joystick value is changed.

◆ SmoothLookSpeed

float BNG.JoystickControl.SmoothLookSpeed = 15f

◆ UseSmoothLook

bool BNG.JoystickControl.UseSmoothLook = true

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