Enemy attack radius
I have a question and hope someone can help me.
I'm currently Working on an Pixel-Top Down-Survival Game (3D) and want that an Enemy follows me and attacks me if i walk into a (maby) invisible radius.
Thanks for helping ! LG Stephan
Answer by hulahoolgames · Jan 17, 2016 at 02:24 AM
You can also add a sphere collider to the enemies and when the player collides with the collider they attack him.
His question is slightly unclear I'm not sure if Sewa wants my answer or your answer.
Answer by toddisarockstar · Jan 17, 2016 at 03:07 AM
http://docs.unity3d.com/ScriptReference/Vector3.Distance.html
I recomend not calling this every frame for proficiency purposes
Answer by Dudicus · Jan 17, 2016 at 03:34 AM
Try watching the tutorial videos on Unity Survival Shooter and recreate the enemy. http://unity3d.com/learn/tutorials/projects/survival-shooter/enemy-one?playlist=17144 @Dudicus