Next: , Previous: , Up: Motion   [Contents][Index]


12.19 Six Axis

Component: SixAxis

This component is a player input controller allowing the user to fly in all directions, truly utilizing 3D space. It takes input from the user, processes it for precision, and applies it as force to the attached Rigidbody

To use, add to the base object that you want the player to fly. If this is a multiplayer game, localize it as a Local Component ([N]etworking tab). Adjust the thrust amount for each direction

Recommended Field of SixAxis: float sidewaysThrust

How much thrusting power do we have in the sideways directions?

Default value: 10.0f

Recommended Field of SixAxis: float reverseThrust

How much thrusting power do we have in the reverse direction?

Default value: 10.0f

Recommended Field of SixAxis: float upwardThrust

How much thrusting power do we have in the upward direction?

Default value: 10.0f

Recommended Field of SixAxis: float downwardThrust

How much thrusting power do we have in the downward direction?

Default value: 10.0f

Field of SixAxis: float deadzone

How much dead space is in the center of the control stick

Default value: 0.25f

Field of SixAxis: KeyCode upKey

A key which, when pressed, applies our Upward Thrust

Default value: KeyCode.Space

Field of SixAxis: KeyCode downKey

A key which, when pressed, applies our Downward Thrust

Default value: KeyCode.LeftShift

Field of SixAxis: bool useLateUpdate

Should we update input after the main loop instead of during? Physical thrust is still applied during physics’ Fixed Update loop.

Default value: true

Field of SixAxis: Rigidbody body

The rigidbody we will be applying force to

Recommended Field of SixAxis: float sidewaysThrust

How much thrusting power do we have in the sideways directions?

Default value: 10.0f

Recommended Field of SixAxis: float reverseThrust

How much thrusting power do we have in the reverse direction?

Default value: 10.0f

Recommended Field of SixAxis: float upwardThrust

How much thrusting power do we have in the upward direction?

Default value: 10.0f

Recommended Field of SixAxis: float downwardThrust

How much thrusting power do we have in the downward direction?

Default value: 10.0f

Field of SixAxis: float deadzone

How much dead space is in the center of the control stick

Default value: 0.25f

Field of SixAxis: KeyCode upKey

A key which, when pressed, applies our Upward Thrust

Default value: KeyCode.Space

Field of SixAxis: KeyCode downKey

A key which, when pressed, applies our Downward Thrust

Default value: KeyCode.LeftShift

Field of SixAxis: bool useLateUpdate

Should we update input after the main loop instead of during? Physical thrust is still applied during physics’ Fixed Update loop.

Default value: true

Field of SixAxis: Rigidbody body

The rigidbody we will be applying force to


Next: , Previous: , Up: Motion   [Contents][Index]