Character Controller Pro (1.4.x)
  • Introduction
  • The package
    • Content
    • Versioning scheme
    • Importing the package
    • Using the package
    • Known issues
  • Fundamentals
    • Core
      • Character
      • Character body
      • Character actor
        • States
        • Stable movement features
        • Velocity
    • Implementation
      • Character state controller
      • Character state
      • Character brain
  • How to...
    • Core
      • Create a basic character
      • Add behavior logic to your character
      • Move the character
      • Rotate the character
      • Leave grounded state (e.g. jump)
      • Change the size of the character
      • Disable collisions (ghost)
      • Use the character information (with examples)
      • Use root motion
      • Detect a character using a "detector"
      • Add a static one way platform
      • Add a dynamic one way platform
    • Implementation
      • Organize the character hierarchy
      • States
        • Add and configure the state machine
        • Create a state
        • Transition from one state to another
        • Handle animation
        • Modify an IK (inverse kinematics) element
      • Actions
        • Define your own actions
        • Use the character actions
        • Use a custom Input Handler
        • Use the new input system
        • Create your own AI movement logic
Powered by GitBook
On this page
  • CharacterStateController component
  • Initial state
  • Movement reference
  1. How to...
  2. Implementation
  3. States

Add and configure the state machine

PreviousStatesNextCreate a state

Last updated 4 years ago

CharacterStateController component

The main component of the state machine is the CharacterStateController. You'll need to add this component anywhere within the character hierarchy (read the section for more information).

Initial state

The state machine needs a state to work with, this is referred as the current state in the inspector. You'll need to add at least one state to the character, and assign that state as the current state reference.

Movement reference

If the character is going to follow a camera direction (common case) choose "External" and assign the camera as the External Reference.

Set up the movement reference (see the section).

Organize the character hierarchy
Character state controller