Art & Design: Player Movement Script

The first code that i decided to do was the player movement script, I knew this would be relativity simple as I  only needed the character to move forward and backward.



The Rigidbody of the player is gathered on start, when updated, the horizontal input is the axis horizontal. When the transform is activated, the vector 3 is moved to the right which is multiplied by the horizontal input, the time.deltatime and the speed.


Comments

Popular Posts