In the past i’ve done movement with rigidbodies and forces, i greatly prefer working with forces. But right now for a simple demo project, i’m trying to use unity’s character controller system
It says it moves the character with the speed vector you input, while automatically applying gravity. Should i understand then, that this function just sets a character’s velocity?
It recommends calling it only once per frame. Why? Why would i even call it that much, if it works how i’m imagining, then surely i’d only call it when i start/stop moving, or want to change direction
are any forces or friction applied? Is there anything that will stop the character moving once it starts? Do i have to call it again with zero vector to make them stop?
It’s a really terrible reference page, it doesn’t really explain anything about how this function works. Can someone please explain it more thoroughly
What it basically does is take in a Vector3 where the y value is ignored. So it only considers the x/z. This is the velocity you want your character to move at.
It will apply some gravity to that value.
And then move in that direction the amount necessary for the frame.
It’s similar to Move:
But instead of having to multiply by ‘deltaTime’ each time, you just pass in the desired velocity. And it will apply any gravity.
It doesn’t set the velocity. It simply mover the character.
Character controllers are weird beasts in that most don’t actually use realistic physics. Players expect characters to change movement the instant input changes.