UNITY TUTORIAL | PROJECT | SPACE SHOOTER |5. Moving Player

UNITY TUTORIAL | PROJECT | SPACE SHOOTER |5. Moving Player2
Creating “PlayerControl” script

 

3
GetComponent() | Input.GetAxis
ezgif.com-video-to-gif (1)
moving “Player” but too slow
5
Creating public float “speed” variable
ezgif.com-video-to-gif (2)
adding more speed to “Player” but no boundary
4
putting value into public variable
7
Creating “Boundary” Class as Public | [System.Serializable] | limiting Player field using Mathf.Clamp
6
using “Serialized” Class to limit “Player”‘s field
ezgif.com-video-to-gif (3)
Bondary limited
9
Giving tilt to “Player” using RigidBody.Rotation
8
Public Tilt variable
ezgif.com-video-to-gif (4)
Giving tilt to “Player” but the wrong rotation
ezgif.com-video-to-gif (5)
Giving “Player” tilt in the right rotation