Making NPCs Follow The Player

For various reasons, today I am working on a prototype based on Crowd City instead of my space shooter. As such, I thought I’d write about the NPC movement.

Variables
In Awake() and Update()
This goes inside the Update’s _followTarget null-check brackets

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.