CharacterController.SimpleMove() very processor heavy?

Hey Guys,

In my game I am using the A* Path-finding script. It is very light when I profile it which is great, but Inside AI follow, there is a call to CharacterController.SimpleMove(). This eats up more then 10x the process of the renderer.

I have about 20-30 enemies on my screen, all using this move method.

I have provided a screenshot of the profiler tool showing this. it is called from the fixed update shown. In case you’re wondering i have my fixed update set to 0.05.

Soon as I stop using SimpleMove() and use Translate instead, Performance is excellent, otherwise it grinds to a halt.

I have decided that CharacterControllers are too processor heavy to use for swarms of enemies, and I will make my own based on box colliders.

I hope though someone can prove me wrong and tell me how to fix this while still using CharacterContorllers.

Thanks!

Alex

It’s wise to use Character Controller only for your main character(player). For AI, I would suggest using rigidbodies or transform.

From the documents;