The question is answered, right answer was accepted
Character Cannot Move from its Spot
I've got a multi-player project where I'm using a state machine on a character (that is instantiated at a certain spot) with a character controller. The script takes input every frame, but for some reason the character won't move at all.
This is the movement section of the script:
private void movement() {
if (movementHorizontal > 0) {
player.thisChar.transform.rotation = Quaternion.Euler(Vector3.zero);
}
else if (movementHorizontal < 0) {
player.thisChar.transform.rotation = Quaternion.Euler(0, 180, 0);
}
movementDirection = new Vector3 (movementHorizontal, 0, movementVertical);
//player.thisChar.transform.position += movementDirection * player.speed * Time.deltaTime;
player.controller.Move (movementDirection * player.speed * Time.deltaTime);
}
The player will turn, as expected, however they will not move from that spot. I've tried using RigidBodies, I've tried editing the position directly (hence the commented out part of the script), and even editing the position in the inspector. IT WILL NOT BUDGE.
The entire project file can be found below. I really need help, I can't figure out what's going wrong.
https://drive.google.com/file/d/0ByMNe0bC15PxekN0RHM0RWVpTFk/view?usp=sharing
(Note: I've posted this same question again because I originally sent it to the Help Room and realized that it may be too specific a problem for that area.)
I found the error and it's a stupid one. I made the old beginner mistake of not checking the "Apply Root $$anonymous$$otion" option on the Animator.
Follow this Question
Related Questions
Character Will Not Move from Spot (At All) 0 Answers
Controller script active on both characters. 1 Answer
Why is my player getting stuck when jumping into awalls? 0 Answers
"Is Walking" is constantly on and I can't turn it off. Help? 0 Answers
First person movement with character controller does not detect ground properly 0 Answers