December 2017
Beginner
290 pages
7h 17m
English
Every time our game starts, we should reset all its conditions to the same state. We already mentioned that resetting the starting position of the Player game object would be a good start. Positions in the 3D world in Unity are described using Vector3 struct. Go ahead and type Vector3 in the Scripting Reference for a better understanding. This is complex stuff, so don't worry if you can't get it. All you need to know now is that Vector3 is made up of three floats describing x, y, and z positions in the space.
Let's go forward and perform some code changes to set up the Player position. In PlayerController, we will do the following:
Read now
Unlock full access