# Can not make characterController work on my project

**URL:** <https://forum.babylonjs.com/t/can-not-make-charactercontroller-work-on-my-project/52215>\
**Category:** Questions\
**Tags:** character-controller\
**Created:** [July 20, 2024, 6:23pm UTC](https://forum.babylonjs.com/t/can-not-make-charactercontroller-work-on-my-project/52215 "2024-07-20T18:23:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leandro\_Roggerone](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/leandro_roggerone/32/40220_2.png) [@Leandro\_Roggerone](https://forum.babylonjs.com/u/Leandro_Roggerone)\
**Post date:** [July 20, 2024, 6:23pm UTC](https://forum.babylonjs.com/t/can-not-make-charactercontroller-work-on-my-project/52215/1 "2024-07-20T18:23:35Z")

</div>

Hello guys , sorry but I still need some help getting the [character controller module](https://github.com/ssatguru/BabylonJS-CharacterController)  
working.

I started from this [template](https://github.com/minibao/babylon-vite) since I would like to add some physics in the future.  
So I wrote my scene class but can not make it work.  
You will see I created 2 loadPlayer functions (using the ImportMesh and ImportMeshAsync methdos) but both returns the:

```auto
Cannot move this mesh. The root node of the mesh provided is not a mesh

```

Here you can find my [repo](https://github.com/leostereo/solidPath.git) .In case you want to try, just clone and checkout to character\_controller branch.  
Thanks !!!

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [July 20, 2024, 10:25pm UTC](https://forum.babylonjs.com/t/can-not-make-charactercontroller-work-on-my-project/52215/2 "2024-07-20T22:25:57Z")

</div>

> [@Leandro\_Roggerone](#):
>
> character\_controller

Hello!

> **[GitHub - RolandCsibrei/solidPath at character\_controller](https://github.com/RolandCsibrei/solidPath/tree/character_controller)**
>
> character\_controller

EDIT: it is fully working now!  
Here is the PR in case you want to merge it. [Character controller by RolandCsibrei · Pull Request #1 · leostereo/solidPath · GitHub](https://github.com/leostereo/solidPath/pull/1) Or you can close the PR.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/9/a9881a21f2ff08a211a069faae42f52b5166867f.jpeg)

Old stuff:  
I changed the character controller and added it as \*.ts file. No npm lib. This way it’s easy to tweak the character controller itself.

Now it attached the mesh to the character controller (no error in the console) but I had to comment out `cc.start()` because I believe you have misconfigured something on the character controller because the mesh disappears if `cc.start()` is called.

Try to remove all errors, like:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/c/fc5d59d80b55b353c776822d2a40fcc9816618ed.png)

* * *

You were using `@babylonjs/core` and `babylonjs` as well. `babylonjs` removed.

---

<div class="post-metadata">

**Author:** ![Leandro\_Roggerone](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/leandro_roggerone/32/40220_2.png) [@Leandro\_Roggerone](https://forum.babylonjs.com/u/Leandro_Roggerone)\
**Post date:** [July 21, 2024, 3:35pm UTC](https://forum.babylonjs.com/t/can-not-make-charactercontroller-work-on-my-project/52215/3 "2024-07-21T15:35:31Z")

</div>

Great !!! Thanks for your help !!!  
It arises some questions.  
Why it uses “vincent.babylon” as character ?  
Why it does not work with any .glb model ?  
Are those .babylon better than .glb models ?  
How should I get the raw version of CharacterController class to include in my project ?  
thanks!!

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [July 21, 2024, 4:58pm UTC](https://forum.babylonjs.com/t/can-not-make-charactercontroller-work-on-my-project/52215/4 "2024-07-21T16:58:32Z")

</div>

> [@Leandro\_Roggerone](#):
>
> Why it uses “vincent.babylon” as character ?

Because I wanted to use the model which was used in their example to avoid any potential errors by doing something else as did they in the example.

> [@Leandro\_Roggerone](#):
>
> Why it does not work with any .glb model ?

You can try to load the `glb`. You should always prefer `glb`. I’m using a new version of the `CharacterController` and I completely rewrote your code so there is a quite big chance it will work with the `glb`.

> [@Leandro\_Roggerone](#):
>
> Are those .babylon better than .glb models ?

The `babylon` file format is a JSON file. It’s advantage is that you can easily modify it or create it from scratch.

Always choose `glb` if you can.

> [@Leandro\_Roggerone](#):
>
> How should I get the raw version of CharacterController class to include in my project ?

It’s already in your project:

> <https://github.com/leostereo/solidPath/blob/character_controller/src/playground/CharacterController.ts>

> [@Leandro\_Roggerone](#):
>
> thanks!!

You are welcome!

---

<div class="post-metadata">

**Author:** ![Leandro\_Roggerone](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/leandro_roggerone/32/40220_2.png) [@Leandro\_Roggerone](https://forum.babylonjs.com/u/Leandro_Roggerone)\
**Post date:** [July 21, 2024, 5:06pm UTC](https://forum.babylonjs.com/t/can-not-make-charactercontroller-work-on-my-project/52215/5 "2024-07-21T17:06:18Z")

</div>

thanks my friend.  
I will continue studing bbjs.

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [July 21, 2024, 5:11pm UTC](https://forum.babylonjs.com/t/can-not-make-charactercontroller-work-on-my-project/52215/6 "2024-07-21T17:11:01Z")

</div>

> [@Leandro\_Roggerone](#):
>
> I will continue studing bbjs.

May the Force be with you!
