- Home /
Question by
RideTheT · Jan 13, 2013 at 10:15 PM ·
charactercontrollercoroutinesimplemove
Why doesn’t SimpleMove work with coroutines?
Hello everyone.
I’ve just started a new project using a character controller and have noticed that CharacterController.SimpleMove doesn’t work with coroutines or animation events. Using the normal move function works fine.
This code won’t do anything:
IEnumerator Move()
{
yield return new WaitForSeconds(1F);
characterController.SimpleMove(moveDirection * 25f);
}
This will move the character but with no delay of course:
IEnumerator Move()
{
characterController.SimpleMove(moveDirection * 25f);
yield return new WaitForSeconds(1F);
}
Is this a bug?
Cheers
Comment
Answer by Lovrenc · Jan 13, 2013 at 10:19 PM
If velocity of you character when that 1 second wait is over is 0, nothing will happen. Othervise it should.
Your answer