SimpleMove and Move

Hello, I noticed in the example tutorial that there is a SimpleMove function called inside the FixedUpdate method.
Such a method is called more than once a frame.

“It is recommended that you make only one call to Move or SimpleMove per frame.”
See code comment in the official doc
http://docs.unity3d.com/Documentation/ScriptReference/CharacterController.Move.html

I moved the code to the Update method and it worked fine.
I guess if this has an impact on performances somewhere else.

Like everything in physic, FixedUpdate is the correct place. The docs is confusing, but they trying to say simple to not call more that one time Move.

Performance is always better in Update because it called less per second, but delta time variation could cause many problems in physic.

This post could clarify:
http://forum.unity3d.com/threads/46331-Documentation-Question-about-CharacterController-Move

Actually the documentation seems to have been recently updated (just after I posted).

The example now shows the Move code inside the update method

It’s now clearly stated

It is recommended that you make only one call to Move or SimpleMove per frame.

The right place seems to be the Update method.
This is strange before it’s actually using physics. Maybe they implemented it in a quirky way.

BUMP.

Thanks man. I guess the FixedUpdate is not a bad choice, it might be suboptimal, but you may want to try and profile it before and after the change.

Ugh… I have changed that method lots of time between the update and fixed update methods… I clearly remember that the docs mentioned FixedUpdate before.

I will update it.