BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController Class Reference
+ Inheritance diagram for BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController:

Detailed Description

Control more thrusters throttle based on an Axis Input. Each axis can control multiple thrusters, split to 2 groups. For a virtual axis you must extend this class and override GetAxisValue().

The axis values are will be translated to each thruster relative throttle, so on a negative value of -0.5 (with min/max -1/1) will set ALL the negative thrusters at 50% throttle value (each thruster can have different min/max throttle values, it doesn't matter).

Don't be mislead by the namings (negative and positive), you will use them actually for top/bottom, left/right etc. For Mouse Axis is more complicated, you will have to get each user's max and minimum values based on their screen size and sensitivity trough a specific calibration process (which you will have to build yourself).

Member Data Documentation

◆ axisName

string BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController.axisName = "Horizontal"

The name of the axis in the Unity engine, see Input Manager Manual entry for more info.

◆ axisMinValue

float BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController.axisMinValue = -1f

The value will be in -1 for keyboard and joystick input. If the axis is setup to be delta mouse movement, the mouse delta is multiplied by the axis sensitivity and the range is not -1...1.

◆ axisMaxValue

float BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController.axisMaxValue = 1f

The value will be in 1 for keyboard and joystick input. If the axis is setup to be delta mouse movement, the mouse delta is multiplied by the axis sensitivity and the range is not -1...1.

◆ deadOffset

float BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController.deadOffset = 0.1f

Same functionality as the Dead value from the InputManager. 0.1f on a -1/1 axis means that all the thrusters will be off for values between -0.1 and 0.1 inclusive.

◆ negativeThrusters

BThrusterBase [] BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController.negativeThrusters

The thrusters that will be throttled when the Axis have a negative (smaller than the median) value.

◆ positiveThrusters

BThrusterBase [] BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController.positiveThrusters

The thrusters that will be throttled when the Axis have a positive (bigger than the median) value.

◆ autoStart

bool BArtisan.Thrusters.Helpers.Controllers.BThrusterAxisController.autoStart = true

When this GO is activated, it will turn ON the engine.

◆ debugLog

bool BArtisan.Thrusters.BBaseMonobehaviour.debugLog = false
inherited

Enable to debug this component. Warning: it may result in CPU intensive debug messages (each frame).