Give Page Feedback | API

Player Movers - Overview

Player Movers allow you to create custom logic for moving the Player assigned to an Active Grid, whenever that Player needs to be moved as a result of an action on the Active Grid or World Origin Cell change.

Why Use A Player Mover?

When not using a Player Mover, the Player object is generally moved by simply setting its Position property (from the IPlayer interface). While this strategy will work fine in a great deal of cases, sometimes moving the Player in this way will result in issues (usually Physics related).

In order to move the Player without running into issues, it may be necessary to time the movement with certain points in the Unity Frame Lifecycle, such as FixedUpdate.

The Player Mover gives you complete flexibility in determining when the Player is moved, except in one scenario, which is when using a World Shifter with the 'Perform Shift In Single Frame' setting enabled. In that instance, the Player Mover's MovePlayerByAmount method is executed in immediate mode in whatever frame the Shifter is set to run in.

Default Player Movers

There are two default Player Mover included with the Streamable Assets Manager, the Player Mover Character Motor and the Fixed Update Player Mover. The Player Mover Character Motor is a simple modification of the standard Character Motor script and is intended to be used in conjunction with a CharacterController script, while the Fixed Update Player Mover can be used when your player can needs to be moved in Fixed Update.

In newer versions of Unity, standard Character Motor and CharacterControllers scripts may no longer be used. It is also very common for each project to have its own custom scripts for controlling the Player; as such, it is common for a Custom Player Mover to be needed on a per Project basis.