A Movement Type decides how directional input is interpreted and which way the character tries to face. Choose one that matches the intended control style, then pair it with a compatible camera View Type.

Movement Types do not move the Rigidbody directly. The active Movement Type supplies an input vector and a yaw change; Ultimate Character Locomotion still applies acceleration, root motion, gravity, collision, slopes, and ability restrictions.

Before you begin

  • Create or update the character through Character Creation. A player character normally receives its look source from the Camera Controller. An AI agent uses Local Look Source, while a networking integration supplies the appropriate remote look source.
  • Configure the camera separately through View Types. The character’s Movement Type and the camera’s View Type are independent selections, so the controller cannot prevent an unsuitable pairing.
  • Configure movement and look mappings through Input before judging a Movement Type.

Choose a Movement Type

The Included Movement Types section contains all supplied options.

First person

General third person

  • Third Person Adventure turns the character into the camera-relative travel direction and uses forward movement instead of strafing. Pair it with the Adventure View Type.
  • Third Person Combat keeps the character aligned for camera-relative strafing and backward movement. Pair it with the Combat View Type.
  • Third Person Four Legged adds turning to horizontal input for generic or quadruped characters. Its default preserves sideways input while turning; enable Rotate To Face Input Direction to turn toward travel and clear the horizontal movement component.
  • Third Person RPG provides RPG-style turning, strafing, and automatic forward movement. Pair it with the RPG View Type.

Specialized third person

Configure the character

For a new character:

  1. Open Tools > Opsive > Ultimate Character Controller > Character Manager.
  2. Choose First, Third, or Both from Perspective.
  3. Choose First Person Movement and/or Third Person Movement for the perspectives in the build.
  4. Finish the remaining character options, then select Build Character. Use Update Character when changing an existing character through the manager.

For an existing character that needs more than its original choice:

  1. Select the character root and find Ultimate Character Locomotion in the Inspector.
  2. Expand Movement Types and use the add control to add each required concrete type. Select a row to configure that type’s own settings.
  3. Use the row’s Active control to choose the type that should start active.
  4. Set First Person Movement Type and/or Third Person Movement Type to the types that should activate for those perspectives. These dropdowns appear only when a type for that perspective is available.
  5. On the Camera Controller, choose the corresponding First Person View Type and/or Third Person View Type. Enable perspective switching only after both sides of the character-camera pairing exist.

There is no universal serialized Movement Type default on Ultimate Character Locomotion. The Character Manager populates the selections from the chosen setup, and the Inspector fills an empty perspective selection from the types already in the list.

Editor checkpoint

Before entering Play Mode, confirm that:

  • Movement Types contains one instance of every required concrete type and no unknown entries.
  • exactly one row is selected as Active;
  • each installed perspective has a First Person Movement Type or Third Person Movement Type selection;
  • the Camera Controller has the corresponding View Type and is attached as the player’s look source; and
  • an AI agent has Local Look Source instead of relying on a player camera.

How it runs

At runtime, the active Movement Type transforms the allowed directional input and calculates the requested yaw change. Character Locomotion then resolves that request against animation root motion, acceleration, gravity, colliders, slopes, moving platforms, and active abilities. A wall can therefore stop a valid forward request, and an ability can suppress input before the Movement Type is applied.

When the camera changes perspective, Ultimate Character Locomotion activates the configured first-person or third-person Movement Type and enables the default FirstPerson or ThirdPerson character State. The Camera Controller changes its View Type independently. Configure both defaults so that character facing and camera behavior change together.

AI, networking, and root motion

  • A Movement Type does not choose an AI destination. Navigation or an ability supplies the movement intent; the Movement Type still shapes any input passed through Character Locomotion. Use Artificial Intelligence for the agent and pathfinding workflow.
  • Core SetMovementType calls are local. In a multiplayer project, change the type on the authoritative character and replicate that choice through the supported networking integration when remote characters must use the same selection.
  • Root-motion position and rotation belong to Character Locomotion and can also be changed by abilities or States. Switching Movement Type alone does not enable or disable root motion.

Verify in Play Mode

  1. Start with the intended row active and confirm that movement input produces the expected facing behavior.
  2. Compare Third Person Adventure with Third Person Combat in otherwise equivalent setups. Adventure should turn into the travel direction; Combat should preserve camera-relative facing while strafing or moving backward.
  3. Move into a wall and across a slope. The character should respect collision and locomotion settings even though the Movement Type continues to request movement.
  4. Aim and use any equipped items. Their direction should agree with the chosen Movement Type, View Type, and look source.
  5. If the character supports both perspectives, switch in both directions. The configured first-person and third-person Movement Types and View Types should activate together, and the FirstPerson and ThirdPerson States should follow the new perspective.
  6. For an AI character, remove dependence on the player camera and verify that Local Look Source supplies the required look direction.
  7. In a networked test, observe the owning and remote instances separately and confirm that any project-specific movement-type synchronization changes both.

Troubleshooting

Symptom Check Fix
Movement input causes a null-reference error or no valid type is active. Movement Types may be empty, contain an unknown entry, or have no valid Active selection. Add a compiled concrete type, select it as Active, and set the relevant perspective dropdown.
The Console reports that no look source is attached. A camera-relative Movement Type has no ILookSource. Attach the Camera Controller to a player character, add Local Look Source for an AI agent, or use the remote look source supplied by the networking integration.
The character moves, but faces differently from the camera design. The Movement Type and View Type may not be a recommended pair. Select the matching pair from the lists above, then retest movement, aim, and backward input.
Perspective switching activates the wrong control style. First Person Movement Type, Third Person Movement Type, or the camera’s corresponding View Type default is incorrect. Set both character defaults and both camera defaults explicitly.
SetMovementType reports that it cannot find a type. The requested concrete type is not present in Movement Types, or its script does not compile. Resolve compiler errors and add the type to the list before requesting it from code.
The character fails during Movement Type initialization. The same concrete class may have been added more than once. Released Version 3 indexes the list by the type’s full name. Keep only one instance of each concrete Movement Type. Use States to vary one type’s settings instead of duplicating it.
The Active radio appears stale after a runtime/API switch. The released Version 3 Inspector binds that radio to an obsolete serialized field name. Treat ActiveMovementType and the movement-type change event as authoritative; reselect or reopen the component when inspecting the serialized start choice.
A custom type is grouped under the wrong perspective or does not update the expected default. The released Version 3 Inspector classifies custom types from FirstPerson or ThirdPerson in the type’s full name. Include the appropriate token in the custom type name or namespace and keep FirstPersonPerspective consistent with it.
A remote character keeps a different Movement Type. The core switch was performed only on one instance. Replicate the type choice through the networking integration or project authority layer.
Root motion changes unexpectedly after a setup change. Character Locomotion, an ability, or a State may be changing root-motion settings. Inspect Use Root Motion Position, Use Root Motion Rotation, active abilities, and active States; do not use Movement Type selection as a root-motion toggle.

Developer reference

Call SetMovementType with a type already present in Movement Types. Do not assign ActiveMovementType directly: that property bypasses the outgoing and incoming lifecycle callbacks, stored perspective default, and change events.

using UnityEngine;
using Opsive.UltimateCharacterController.Character;
using Adventure = Opsive.UltimateCharacterController.ThirdPersonController.Character.MovementTypes.Adventure;
using Combat = Opsive.UltimateCharacterController.ThirdPersonController.Character.MovementTypes.Combat;

public class MovementStyleSelector : MonoBehaviour
{
    private UltimateCharacterLocomotion m_CharacterLocomotion;

    private void Awake()
    {
        m_CharacterLocomotion = GetComponent<UltimateCharacterLocomotion>();
    }

    public void UseAdventureMovement()
    {
        m_CharacterLocomotion.SetMovementType(typeof(Adventure));
    }

    public void UseCombatMovement()
    {
        m_CharacterLocomotion.SetMovementType(typeof(Combat));
    }
}

OnMovementTypeActiveEvent and the OnCharacterChangeMovementType event both supply the Movement Type and an activation boolean. A switch first reports the outgoing type with false, then the incoming type with true.

Create a custom Movement Type

Create a custom type only when the included options and their States cannot produce the required input and facing behavior. A concrete MovementType must identify its perspective, return the yaw change, and return the input vector passed to Character Locomotion.

This third-person example preserves the current yaw and passes directional input through unchanged. Its namespace contains ThirdPerson so the released Version 3 Inspector classifies it consistently.

namespace MyGame.ThirdPerson.MovementTypes
{
    using Opsive.UltimateCharacterController.Character.MovementTypes;
    using UnityEngine;

    [System.Serializable]
    public class FixedForward : MovementType
    {
        public override bool FirstPersonPerspective => false;

        public override float GetDeltaYawRotation(
            float characterHorizontalMovement,
            float characterForwardMovement,
            float cameraHorizontalMovement,
            float cameraVerticalMovement)
        {
            return 0;
        }

        public override Vector2 GetInputVector(Vector2 inputVector)
        {
            return inputVector;
        }
    }
}

After the script compiles, add Fixed Forward to Movement Types, choose it in the appropriate perspective dropdown, and repeat the same Play Mode checks used for an included type.