Physics Character Controller

Unity Asset

Physics Character Controller is a Unity tool that delivers a simple yet powerful rigidbody-based character controller. Built on the native physics system, it lets characters move, climb, slide, wall jump, and push objects without custom kinematics. It is easy to set up, highly customizable, and designed to interact naturally with the physical environment.

PBCC prefabs

Compatible with Unity 6, 2023.2, 2022.3 LTS, and 2021.3 LTS, it works with the New Input System as well as the Old Input System and supports Built-in, URP, and HDRP pipelines with no extra setup. Core content is organized into prefabs with the Prb prefix, including platforms, fluids, areas and slopes. The essential controller prefabs are:

  • [InputSystem]: Contains the InputReader script, which collects input from either system and converts it into usable data.

  • [Player]: Holds the CharacterManager script that applies input data to control character movement.

  • [Cameras]: Provides the system for handling camera motion, which can be replaced or extended with your own solution. PBCC overview

External Packages

The controller integrates with Cinemachine for camera motion and TextMeshPro for text rendering. Both are optional and can be replaced with custom solutions, since camera control and input handling are decoupled from the CharacterManager.

Project Manager

On the Asset Store you can download different package versions of the Physics Character Controller depending on your project version. Unity 2021.3 LTS, 2022.3 LTS and 2023.2 use Cinemachine 2.X, while Unity 6 introduces support for Cinemachine 3.X. The differences between the two will be explained in the Camera section.

The controller works with both the Old Input System and the New Input System. Using the Old System requires no additional packages, while the official Input System package is required via the Package Manager if you choose to use the new input.

Project Manager

Input Setup

All input is handled by the InputReader script, which automatically detects and uses the active Input System. No code changes are required. Simply select the Input Handling Mode in the project settings.

Input detection

The only requirement when using the Old Input System is to remove the MovementActions assets in the Input folder. With the New Input System, no additional setup is required.

Delete InputActions

Camera

Camera control is managed through a centralized script called CameraManager. Its role is limited to handling the logic for switching between First Person and Third Person views. The camera hierarchy includes the MainCamera, an OverlayUI, and two Cinemachine cameras: one for first person and one for third person.

When using Cinemachine 2.X (Unity 2021.3 LTS, 2022.3 LTS, 2023.2, or earlier), each camera includes a dedicated script (FirstPersonCameraController or ThirdPersonCameraController) to configure smoothness and sensitivity based on the input type.

Camera Manager setup

When using Cinemachine 3.X (Unity 6 or above), these controller scripts are no longer required. Input for both Input Systems is handled by the CinemachineInputAxisController, and sensitivity is defined in the linked CinemachineInputActions asset.

Camera Manager setup

Character Manager

The CharacterManager is the core script of the controller. It is used in the sample scene PCC_Gym with a simple capsule setup, and in PCC_Gym_Humanoid on a humanoid character as an example of how animations can be integrated

Character Manager setup

The collision setup is straightforward: the CharacterManager GameObject must include a Capsule Collider and a Rigidbody. Gravity is not enabled on the Rigidbody, as it is applied in code by the CharacterManager, and rotation should be frozen to ensure stable movement.

Character Manager setup

Movement

The CharacterManager provides a set of movement variables in the inspector. These allow you to adjust how the character walks, crouches, and responds to input, making it simple to tailor movement to your project without editing code.

Character Manager - Movement settings

Variables

  • Ground Mask: Defines which layers the player can collide with to be considered grounded.

  • Movement Speed: The base speed of the character when moving.

  • Crouch Speed Multiplier: Determines how much slower the character moves while crouching (e.g. a value of 0.5 means movement is halved).

  • Movement Threshold: The minimum input required for the character to start moving.

  • Damp Speed Up / Damp Speed Down: Controls how quickly the character accelerates or slows down.

The Ground Mask is essential for allowing the player to be grounded. It is also recommended to configure the project’s Physics settings so the capsule collider interacts properly with the desired layers.

Jump & Gravity

The CharacterManager provides variables to customize how jumping and gravity behave. These settings let you control jump force, fall speed, air friction, and extended jump behavior, allowing for anything from realistic motion to more exaggerated, arcade-style movement.

Character Manager - Jump & Gravity settings

Variables

  • Jump Velocity: Controls the initial force applied when the player jumps.

  • Fall Multiplier: Adjusts gravity strength while falling. A value greater than 1 increases fall speed for a snappier, more cartoony jump. Character Manager - Jump & Gravity settings

  • Hold Jump Multiplier: Extends airtime when the jump button is held, making jumps feel more responsive.

  • Friction Against Floor: Defines how much friction applies when moving along the ground.

  • Friction Against Wall: Defines how much friction applies when sliding against walls.

  • Can Long Jump: If enabled, allows the player to stay longer in the air and cover more distance when holding the jump button.

Slopes & Steps

The CharacterManager includes settings to control how the character interacts with slopes and steps. These variables define climbable angles, maximum step height, and how gravity and multipliers behave on different surfaces. They make it possible to fine-tune realistic climbing, sliding, and stair traversal.

Character Manager - Slopes & Steps settings

Variables

  • Ground Checker Threshold: Minimum distance from the bottom of the player to the floor required to be considered grounded.

  • Slope Checker Threshold: Distance from the center of the player used to check if the character is standing on a slope.

  • Step Checker Threshold: Distance from the center of the player used to check if the character is on a step.

  • Max Climbable Slope Angle: The maximum slope angle the player is allowed to climb.

  • Max Step Height: The maximum height of a step that the player can climb over.

  • Speed Multiplier on Angle: Defines additional speed adjustments applied at specific angles, such as ramps.

  • Can Slide Multiplier Curve: Curve effect applied when sliding.

  • Can’t Slide Multiplier Curve: Curve effect applied when standing on slopes too steep to climb.

  • Climbing Stairs Multiplier Curve: Curve effect applied when stepping up stairs.

  • Gravity Multiplier: Base gravity applied to the player.

  • Gravity Multiplier on Slide: Extra gravity applied when the player is sliding.

  • Gravity Multiplier on Unclimbable Slide: Stronger gravity applied when the player is on a slope that cannot be climbed.

  • Lock on Slope: If enabled, the player sticks to the slope and does not slide down due to gravity. Character Manager - Slopes & Steps settings

Wall Slide

The CharacterManager includes wall slide settings that define how the character interacts with walls. These variables control detection distance, jump multipliers, and allow you to fine-tune wall jumps in relation to gravity and vertical boost.

Character Manager - Wall Slide settings

Variables

  • Wall Checker Threshold: Minimum distance from the center of the player to a wall required to be considered in contact.

  • High Wall Checker: The vertical height of the wall checker threshold.

  • Jump From Wall Multiplier: Additional speed applied to both the X and Y axes when jumping from a wall.

  • Multiplier Vertical Leap: A multiplier applied only to the Y axis when wall jumping. Useful in cases of strong gravity settings to artificially boost vertical jump height.

Sprint & Crouch

Sprint and crouch behavior is handled directly in the CharacterManager. These variables allow you to configure sprint speed, collider scaling while crouching, and the head reference points used for cameras.

Character Manager - Sprint & Crouch settings

Variables

  • Sprint Speed: Defines how fast the character moves while sprinting.

  • Crouch Height Multiplier: Scales the collider’s height when crouching. For example, a collider of height 2 with a multiplier of 0.5 will shrink to a height of 1.

  • POV Normal Head Height: The head point position when standing, mainly for camera reference.

  • POV Crouch Head Height: The head point position when crouching, also used by cameras.

References

The CharacterManager requires references in the inspector to function correctly. These link the controller to the camera, character mesh, input system, and other helper objects. Most fields are essential, while mesh references can be left empty if you plan to use your own animation setup.

Character Manager - References

Variables

  • Character Camera: Reference to the main camera, used to move the character relative to camera orientation.

  • Character Model: The parent GameObject of the mesh, responsible for handling rotation.
    Character Model Rotation Smooth: Defines how smoothly the model rotates.

  • Mesh Character / Mesh Character Crouch: Meshes used when standing or crouching. These can be left empty if you want to integrate custom animation solutions.

  • Head Point: Transform reference for the head position, typically used by cameras.

  • Input: Reference to the InputReader from the Input System.

Events

The CharacterManager also exposes a set of Unity events that are triggered when specific actions occur, such as jumping, landing, sprinting, or sliding. These can be used to call external methods, play sound effects, trigger particle systems, or interact with other scripts in your project.

Character Manager - Events inspector

Useful Methods

The CharacterManager provides several helper methods to access private variables such as grounded state, slope or wall detection, jumping, and crouching. These methods can also be used to lock character rotation or retrieve the original collider height, making it easier to extend the controller without modifying its core code.

Character Manager - Useful Methods

Moving Platforms

The MovingPlatform script allows objects to translate and/or rotate while interacting with the player. Each platform uses a PlatformSensor trigger to detect when the player is on it. Platforms require a Collider (set as Trigger) and a Rigidbody configured as kinematic, with gravity disabled and rotation frozen, since their motion is fully managed by the script.

Moving Platform setup

Variables

  • Destinations: List of positions the platform moves between (local space if parented).

  • Time Delay: Interval before moving to the next position.

  • Time Delay Beginning End: Extra delay before starting a new cycle.

  • Platform Speed Damp: Controls smoothness of the platform’s movement.

  • Smooth Movement: Toggles damping for smoother transitions between destinations.

  • Can Translate: Toggles platform translation between destinations.

  • Rotation Speed: Defines how fast the platform rotates on its axes.

  • Can Rotate: Enables or disables platform rotation.

  • Can Be Moved: Allows external forces or the player to affect the platform’s motion. Moving Platform setup

Trampolines

The TrampolinePlatform script applies a vertical force to the player or any object that interacts with it. Similar to the MovingPlatform, it includes a child trigger with the TrampolineSensor script to detect collisions, while its motion is handled kinematically.

Trampoline Platform setup

Variables

  • Bounce Strength: Defines the force applied upward when the player (or another object) lands on the trampoline. Trampoline Platform setup

Speed Boosts

The SpeedArea script is applied to a trigger zone that changes the character’s movement speed by a set multiplier. This allows you to create regions where the player moves faster or slower, depending on the configured value.

Speed Area setup

Variables

  • Velocity Multiplier: Defines how much the character’s speed is scaled inside the area. A value of 1 leaves the speed unchanged, while values below 1 slow the player down and values above 1 tweak movement speed. Speed Area setup

Gravity Areas

The GravityArea script is applied to a trigger zone that modifies the gravity acting on the character. This allows you to create regions with altered gravity, such as heavier zones, lighter jumps, or even zero-gravity areas.

Gravity Area setup

Variables

  • Gravity Force: Defines the gravity applied inside the area along the X, Y, and Z axes. A value of (1, 1, 1) keeps gravity unchanged, while higher or lower values adjust its strength on an axis. Gravity Area setup

Ladders

The Ladder script is a variation of the Gravity Area. It uses the InputReader to capture vertical input and translates it into upward or downward motion, allowing the player to climb when inside the trigger zone.

Ladder setup

Variables

  • Climb Speed: Defines how fast the player moves up or down the ladder.

  • Force On Dismount: The vertical force applied to the player when leaving the ladder. A negative value pushes the player downward, useful for preventing "floating" when stepping off.

  • Input: Reference to the InputReader, which provides the vertical input data for climbing. Ladder setup

Arrow Image