gauge-highSpeed Changer

Changing the player’s speed at the start and finish

Within the level, a system for controlling the player’s speed through special triggers is implemented.

General behavior:

At the start of the level, the player leaves the starting zone with an increased initial speed. When entering a SpeedChangerTrigger:

  • The first trigger (after the start) switches the speed to the normal (gameplay) speed.

  • The second trigger (before the finish) restores the initial speed (for visual emphasis).

System features:

  • There are always two SpeedChangerTriggers on each level:

    • One at the base exit (transition to active gameplay);

    • The second one before the finish line (for a smooth entry into the completion zone).

  • Speed changes happen automatically without any player input.

This system helps set the desired dynamics for the start and finish of the level, enhancing the visual perception and overall gameplay presentation.

circle-info

The GameObject that has the SpeedChangeTrigger component must have the tag: SpeedChanger.

How the player reacts to the trigger

On the PlayerContext prefab, there is a component called SplineMover.cs which implements the method OnTriggerEnter(Collider other). This method checks if the object entering the collider has the tag SpeedChanger.

Last updated