# Physics Based Character Controller

**URL:** https://discussions.unity.com/t/physics-based-character-controller/869700
**Category:** Community Showcases
**Tags:** Asset-Store-Assets
**Created:** [January 26, 2022, 7:17pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700 "2022-01-26T19:17:29Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![nappin\_zz](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/nappin_zz/32/459635_2.png) [@nappin\_zz](https://discussions.unity.com/u/nappin_zz)
#### Post date: [January 26, 2022, 7:17pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/1 "2022-01-26T19:17:29Z")

</div>

[![](https://europe1.discourse-cdn.com/unity/original/4X/5/7/d/57dfee31cfc112038a3b64b03173388fc201cbe9.jpeg "Physics Character Controller (Rigidbody)") ](https://www.youtube.com/watch?v=dics8kLq2pM)

> **[Unity ID](https://id.unity.com/en/conversations/abb841d3-db38-4820-910b-97e76935342c009f)**
>
> Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.

**What is it?**

Physics Based Character Controller is a powerful yet simple character controller based on the unity physics system. The player can easily interact with the physical environment, move and push objects, slide on surfaces, climb, wall jump and so on…

**How do I use it?**

Simple: install the package, setup a camera (the package uses cinemachine but can work with custom cameras) and the input reader and you are ready to go! The package accommodates the user who wants a simple plug and play solution and also developers who want to add their own modifications on top of the existing code.

**What’s included?**

The package contains:

- Player model and multiple obstacle meshes
- Prefab folder with all the “core” components
- A sample scene that guides the user and allows them to experiment with the character controller and find the best parameters combination for their needs

**The package main features are:**

- Basic character movement in third and first person
- Player can move the character and rotate the camera
- Player can perform jump, long jumps, wall climb, wall slide, crouch, climb and sprint
- Camera solution to avoid clipping with the objects in the scene
- Capsule based collision and simple interpolated movements
- Allows the player to walk on rubble and irregular terrain
- Allows the player to walk on smooth terrain with changing normals
- Allows the player to move up a slope within a certain angle limit
- Ground snapping so the player can stick to surfaces and slopes
- Allows the player to move on steps (within a certain height set by the player)
- Supports rigidbody interaction and allows the player to move and collide with rigidbodies
- Supports and ignores specific layers
- Contains prefab that simulate viscosity
- Contrains speedup and slowdown platforms
- Contains bounce platforms
- Contains moving platforms
- Contains rotating platforms that keep the player rotation locked

If you have any questions, suggestions or feedback, please feel free to contact me at [nappin.1bit@gmail.com](mailto:nappin.1bit@gmail.com)

---

<div class="post-metadata">

### Author: ![GrooGadgets](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/groogadgets/32/85008_2.png) [@GrooGadgets](https://discussions.unity.com/u/GrooGadgets)
#### Post date: [June 10, 2022, 4:56pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/2 "2022-06-10T16:56:25Z")

</div>

Hey,

Does this asset support root motion?

---

<div class="post-metadata">

### Author: ![nappin\_zz](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/nappin_zz/32/459635_2.png) [@nappin\_zz](https://discussions.unity.com/u/nappin_zz)
#### Post date: [June 11, 2022, 4:24pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/3 "2022-06-11T16:24:29Z")

</div>

Hi, nope at the moment it doesn’t. We are working on an update to include root motion as well

---

<div class="post-metadata">

### Author: ![GrooGadgets](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/groogadgets/32/85008_2.png) [@GrooGadgets](https://discussions.unity.com/u/GrooGadgets)
#### Post date: [June 16, 2022, 1:42pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/4 "2022-06-16T13:42:33Z")

</div>

Thanks for the reply, can you tell me when you expect the update to be ready?

---

<div class="post-metadata">

### Author: ![nappin\_zz](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/nappin_zz/32/459635_2.png) [@nappin\_zz](https://discussions.unity.com/u/nappin_zz)
#### Post date: [June 28, 2022, 6:35am UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/5 "2022-06-28T06:35:35Z")

</div>

I’ve got no ETA at the moment as more important asset updates are taking priority. When I’ll have an idea of the timeframe I’ll of course update you!

---

<div class="post-metadata">

### Author: ![esgugel](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@esgugel](https://discussions.unity.com/u/esgugel)
#### Post date: [July 24, 2022, 11:45pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/6 "2022-07-24T23:45:49Z")

</div>

RuntimeNavMeshBuilder: Source mesh eyes does not allow read access. This will work in playmode in the editor but not in player  
UnityEngine.AI.NavMeshSurface:BuildNavMesh()  
NavMeshGenerator:Start() (at Assets/MyAssets/Scripts/NavMeshGenerator.cs:13)  
 ![](https://ibb.co/TmQyB93)

```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.AI;

public class NavMeshGenerator : MonoBehaviour
{
    public NavMeshSurface surface;

    void Start()
    {
        surface.BuildNavMesh();
    }

    // Update is called once per frame
    void Update()
    {
     

       // UpdateNAvmesh();
    }

    public void UpdateNAvmesh()
    {
      
    }
}

```

 ![8308038--1089900--01.JPG](https://europe1.discourse-cdn.com/unity/original/4X/c/1/e/c1e90490e2db233996cc1bab1f86b2f3484a5cc7.jpeg)  
[8308038–1089903–NavMeshSurface.cs](https://discussions.unity.com/uploads/short-url/lj0FGcgidAX1jzNCy9M8iYt4XjW.cs) (16.1 KB)

---

<div class="post-metadata">

### Author: ![nappin\_zz](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/nappin_zz/32/459635_2.png) [@nappin\_zz](https://discussions.unity.com/u/nappin_zz)
#### Post date: [July 31, 2022, 8:18am UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/7 "2022-07-31T08:18:15Z")

</div>

Hi! As far as I can tell the code you are showing is about the navmeshes and doesn’t have to do with the eyes mesh. The code is also not from the asset. What’s the issue specifically?

---

<div class="post-metadata">

### Author: ![AHWilliams614](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@AHWilliams614](https://discussions.unity.com/u/AHWilliams614)
#### Post date: [August 11, 2022, 3:53pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/8 "2022-08-11T15:53:12Z")

</div>

Hello, this asset is pretty much everything I need. However I am stumped on implementing a simple climbing mechanic similar to what you’d find in Breath of the Wild. Curious to know if anyone has any idea how you’d include something like that?

---

<div class="post-metadata">

### Author: ![nappin\_zz](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/nappin_zz/32/459635_2.png) [@nappin\_zz](https://discussions.unity.com/u/nappin_zz)
#### Post date: [August 12, 2022, 7:31am UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/9 "2022-08-12T07:31:08Z")

</div>

Hi, if you intend to implement a climb mechanic I suggest to use the “Ladder” script and mute the CharacterManager script when on a wall or tweak its gravity / drag values. I’m of course available if you need help with custom code!

---

<div class="post-metadata">

### Author: ![Migaroez](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@Migaroez](https://discussions.unity.com/u/Migaroez)
#### Post date: [September 11, 2022, 1:14pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/10 "2022-09-11T13:14:57Z")

</div>

Am I missing something or is the camera prefab shown in the documentation not included in the current release?

Update  
There is indeed no prefab, but the object does exist in the sample scene which is in the top folder

---

<div class="post-metadata">

### Author: ![nappin\_zz](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/nappin_zz/32/459635_2.png) [@nappin\_zz](https://discussions.unity.com/u/nappin_zz)
#### Post date: [October 1, 2022, 7:16am UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/11 "2022-10-01T07:16:20Z")

</div>

Hi Migaroez! The asset works with cinemachine but supports all kinds of custom camera solutions. In the example scene I’ve setup a cinemachine that can indeed be copied in your own controller but also you can create another cinemachine camera solution and plug it in the controller.

If enough people ask for it, I’ll create a few cinemachine camera prefabs for those that want to use this setup. Tnx for the feedback!

---

<div class="post-metadata">

### Author: ![macube](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/macube/32/901309_2.png) [@macube](https://discussions.unity.com/u/macube)
#### Post date: [November 14, 2022, 11:57am UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/12 "2022-11-14T11:57:33Z")

</div>

Hey,  
i’m tested the webgl demo from the asset and i noticed one thing: if you stand directly in front of a wall and press the jump button, the jump does not work. A bug?

---

<div class="post-metadata">

### Author: ![Gardan](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/gardan/32/155214_2.png) [@Gardan](https://discussions.unity.com/u/Gardan)
#### Post date: [November 15, 2022, 11:03pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/13 "2022-11-15T23:03:04Z")

</div>

Hi, I’ve purchased the asset a few months ago, but only got the chance to use it recently. Loving it so far!

Edit: I had a question regarding slopes, but it seems I didn’t notice I just had to check the Lock on slope box to get the result I wanted.

solved

What I’m trying to achieve is to have the character slow down when going up a slide, and speed up when going down.  
I believe I have to tweak canSlideMultiplierCurve, and I got a moderate success in doing so, but I do have jittery movement, as both negative and positive values are applied during update.

```csharp
if (transform.position.y < lastCharacterYPosition){
    Debug.Log("going down");
    canSlideMultiplierCurve = 3.0f;
}
else if (transform.position.y > lastCharacterYPosition){
    Debug.Log("going up");
    canSlideMultiplierCurve = -1.0f;
}

lastCharacterYPosition = transform.position.y;

```

I’m not really sure if there is a proper and easy way to determine if the character is going up or down, as  
currentSurfaceAngle is always positive.

---

<div class="post-metadata">

### Author: ![GrooGadgets](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/groogadgets/32/85008_2.png) [@GrooGadgets](https://discussions.unity.com/u/GrooGadgets)
#### Post date: [November 25, 2022, 10:03pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/14 "2022-11-25T22:03:22Z")

</div>

Hey @nappin_zz any word on root motion support?

---

<div class="post-metadata">

### Author: ![nappin\_zz](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/nappin_zz/32/459635_2.png) [@nappin\_zz](https://discussions.unity.com/u/nappin_zz)
#### Post date: [November 29, 2022, 1:55pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/15 "2022-11-29T13:55:59Z")

</div>

Hey @Gardan ! Awesome thank you for the kind words let me know if you encounter other issues!

---

<div class="post-metadata">

### Author: ![nappin\_zz](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/nappin_zz/32/459635_2.png) [@nappin\_zz](https://discussions.unity.com/u/nappin_zz)
#### Post date: [November 29, 2022, 1:57pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/16 "2022-11-29T13:57:08Z")

</div>

Hey @GrooGadgets , not yet other updated are taking priority as of now. When we work on it I’ll be sure to ping you! Tnx

---

<div class="post-metadata">

### Author: ![Psycho-Designs](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/psycho-designs/32/422168_2.png) [@Psycho-Designs](https://discussions.unity.com/u/Psycho-Designs)
#### Post date: [December 14, 2022, 1:01am UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/17 "2022-12-14T01:01:31Z")

</div>

Hi, Would this character controller be able to walk around a dynamic RigidBody platform? I saw in the documentation that it works but I’d have to freeze rotation and have the RigidBody controlled by the script. Would it be possible to have it work with a RigidBody that’s driven by physics (Like Wheel Colliders)?

---

<div class="post-metadata">

### Author: ![Alima-Studios](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/alima-studios/32/539291_2.png) [@Alima-Studios](https://discussions.unity.com/u/Alima-Studios)
#### Post date: [February 19, 2023, 5:14pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/18 "2023-02-19T17:14:23Z")

</div>

Hi , speed of fall is damped when jumping

---

<div class="post-metadata">

### Author: ![blunzn](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@blunzn](https://discussions.unity.com/u/blunzn)
#### Post date: [February 19, 2023, 8:01pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/19 "2023-02-19T20:01:10Z")

</div>

hi, is this controlling a dynamic rigid body, so that physical interactions with other dynamic objects of different weights creates physically plausible results? Ie that lighter objects can be pushed more easily than heavier objects, and the player itself can be pushed by other moving entities? thanks!

---

<div class="post-metadata">

### Author: ![Yardood](https://avatars.discourse-cdn.com/v4/letter/y/e47774/32.png) [@Yardood](https://discussions.unity.com/u/Yardood)
#### Post date: [February 27, 2023, 8:09pm UTC](https://discussions.unity.com/t/physics-based-character-controller/869700/20 "2023-02-27T20:09:32Z")

</div>

Hey, is there any easy way to implement a custom gravity code I have for this player? i’m having a walkable planets with custom directions to the gravity type of project.

Thanks!

[Next page](https://discussions.unity.com/t/physics-based-character-controller/869700.md?page=2)
