The Ultimate Character Controller is moved during the FixedUpdate loop by the Kinematic Object Manager. The Kinematic Object Manager ensures the character (and other kinematic objects) move at a smooth rate while updating at a fixed timestep. If you want to have your object moved by the Kinematic Object Manager you can implement the IKinematicObject interface but this isn’t always possible, especially when integrating the controller with other assets. The Move With Object ability will allow your character to move with the target object even if that target object is updated outside of the Kinematic Object Manager loop. The target object must be updated within the Fixed Update loop otherwise there will be noticeable jitter.

Setup

  1. Select the + button in the ability list under the “Abilities” foldout of the Ultimate Character Locomotion component.
  2. Add the Move With Object ability. The ability will be able to start no matter what position it is in within the ability list.
  3. Ensure the object that the character should follow updates within the FixedUpdate loop. In the demo scene the SimplePlatform component is an example of a object that can move the character while executing outside of the Kinematic Object Manager loop.
  4. Add the Kinematic Object component to the object that the character should follow. In the demo this is the same object that the SimplePlatform component was added to.
  5. Ensure the script that updates within FixedUpdate executes the Kinematic Object component. In most cases nothing needs to be changed but if the script updates after the Kinematic Object component then there will be jitter. This can be set in the Script Execution Order window.
  6. The Move With Object ability will start when it has a Target field, and it will stop when the Target field is set to null.

Inspected Fields

Target

The object that the character should move with.