December 2013
Beginner
320 pages
8h 22m
English
With a very short script, we can easily allow all our enemies know the location of the player:
Scripts folder of the Project window. Name it PlayerPosition.public static Vector3 position = Vector3.zero;
Start function. This function is automatically called when a scene is first loaded. We use it so that the position variable can be filled and used as soon as the game starts.public void Start() { position = transform.position; ...Read now
Unlock full access