Coding skills: Part 2
- neelvinay17
- Aug 24, 2023
- 1 min read
We had left off yesterday at the game's input latency, and today I want to discuss some of the specifics of the scripts I created. The 2 scripts I had created by this point were the input handler, and player locomotion. I started off by creating lots of variables for the mouseX and mouseY movements, along with variables for the horizontal and vertical movement. I then added a public void for OnEnable, saying that if the input actions were null, then input actions would be set to new player controls. Moving onto the player locomotion script, I started using rigidbodies and serialized fields to add in customizable player movement stats. As for rotation, I used a vector 3 to manage that along with the vertical and horizontal variables I had created earlier.




Comments