Outputs the tilt direction of the device.

Accelerometer

Outputs:

  • Direction: Outputs the tilt direction of the device.

Notes

  • The accelerometer makes the screen orientation unchangeable during gameplay when the direction output is connected to anything.

Examples

The accelerometer can be connected to anything to lock your screen's orientation, even things that do nothing at all, this can be used for scripts that only work in one orientation.

The accelerometer by itself is jumpy and not very smooth at all, this can be fixed with the next script!

If you're too busy and don't have the time to do all of that, get smoothmeter! Combined with the second script, you can make labyrinth-style camera rotations that look nice on the eyes!