Pet Sheep Challenge


Attached with article is a file called PetSheepStarter.zip.  Download and bring it into a new Unity project.   Inside you will find a scene called PetSheep.  Open this up.  It contains a First Person Controller that you can move with the arrow-keys and mouse.  After hitting play the cursor will disappear in the game window.  To get it back press ESC.



You challenge is to write a script, called FollowPlayer.cs that can be attached to the sheep to have it follow the player around.  It should stop following the player when it is within a distance of 5 from the player.  Set its initial speed to 2 metres/second when it moves.

 

The solution can be found in PetSheepSolution.zip.