- Home /
Targetting script bug. (Javascript)
Hi everybody, I'm learning Unity and now I'm trying to do a Targetting script. For now it runs well but there is a little problem that I can't find. When I target an enemy it becames red when i look for him but if i don't look to anybody it should be all white. Most of time it works right but sometime one comes selected when all should be white. Can someone help me?
I have done a empty project with an example so it's easy to see the problem and try it out.
Link to download: https://mega.co.nz/#!RpByCapB!NVxRFW...0L9yH9qt6mIDgc
Key: NVxRFWxKx_Gv7663j1moXi13xWFw30L9yH9qt6mIDgc (shouldn't be needed)
Thanks in advance
Your answer
Follow this Question
Related Questions
Test if object is within collider bounds on start 0 Answers
A node in a childnode? 1 Answer
How to make it so enemies only move towards the player when the player is colliding with an object 1 Answer
Amount of light at a point? 1 Answer
Fade out effect isn't working if loaded at the second time. 2 Answers