Understanding a line of code

I know this piece of script is supposed to move the character:

    movement.collisionFlags = controller.Move (currentMovementOffset);

But I don't quite understand what it does. I would assume that

controller.Move (currentMovementOffset);

would be enough. Why the

movement.collisionFlags

bit?

1 Answer

1

the method .Move returns some CollisionFlags so that you know if the CharacterController hit something when it tried to move. In the unity examples it is used for checking if you've hit the ground iirc.

Thank you, that makes sense.