Gyroscope

The Gyroscope Actions are designed for Movement or Camera control. They cannot be used simultaneously. The component will test for a Gyroscope (more precise) being present on the device, and if not, it will automatically use the Accelerometer (which 90% of phones include). This module has three Actions:

Action Name

Description

Set Adv Gyro Camera

This Action controls the Adventure Camera from the Gyroscope

Set Fps Gyro Camera

This Action controls the First Person Camera from the Gyroscope

Set Gyro Touchstick

This controls the Player Movement from the Gyroscope.

Hide Gyro Touchstick

Enables/Disables the Gyro Touchstick

Disable Adv Gyro Camera

Enables/Disables the Gyro Adventure Camera

Disable Fps Gyro Camera

Enables/Disables the Gyro First Person Camera

Note: If the Device does not have a Gyroscope, these Actions will utilise the Accelerometer.

Movement from Gyroscope

As with other Touchsticks for Movement, when using the Gyro Touchstick, the Prefab must be added to the Game Creator Preferences Panel.

Once this is done, the Set Gyro Touchstick Action can be called, usually from an On Start Trigger.

This Actions has several options to set depending on your requirements.

Option Name

Description

Activate Gyro Movement

This tells GC to use the Gyroscope or not.

Track x Axis

The x Axis is for moving left and right

Track y Axis

The y Axis is for moving forward and back

Horizontal is Zero

If this is set, no movement will happen if the device is flat on the desk,

otherwise the zero point is set when the device is at 45 degrees.

Invert Axis

When set, this will reverse the angles, left for right, down for up, etc.

Movement Speed

The movement speed is a Multiplier for the Gyroscope sensitivity.

To disable and enable the Gyroscope touchstick, use the Hide Gyro Touchstick Action. This will toggle the Activate setting of the Touchstick.

Camera from Gyroscope

The Gyro Camera would normally be used in conjunction with a Static Touchstick, but this is no mandatory. Please note that these Actions only controls the Game Creator Camera Motors (Adventure and First Person) and are not intended to be used as a VR Camera would be.

The Camera Actions are similar to the Movement Actions, however there is one Action for the Adventure Camera Motor and a separate one for the First Person. Unless the Camera Motor is the Main Camera, you must add the Camera Motor to the Action. The Player should also be added, but this mat change in future versions.

The Camera Sensitivity should be set for the required camera tracking, and this can also be set from a GC Variable. The other Parameters are the same as for Movement.

Option Name

Description

Activate Gyro Camera

This tells GC to use the Gyroscope or not.

Track x Axis

The x Axis is for moving left and right

Track y Axis

The y Axis is for moving forward and back

Horizontal is Zero

If this is set, no movement will happen if the device is flat on the desk,

otherwise the zero point is set when the device is at 45 degrees.

Invert Axis

When set, this will reverse the angles, left for right, down for up, etc.

To disable and enable the Gyroscope Camera, use the Enable/Disable Gyro Camera Action. This will toggle the Activate setting of the Camera, but unlike the Movement Action, you must also add the Action that Set the Gyro Camera.

For more information on Gyro TouchStick Actions, see Example 6 - Gyro Controls, and for details on the use of the Gyro Camera see Example 7 - Gyro Camera.

Last updated