Quantcast
Channel: Latest Questions by zeuo
Viewing all articles
Browse latest Browse all 90

Vector3.Distance error plizzzzzz help

$
0
0
im always getting a NullReferenceException: Object reference not set to an instance of an object at line 4 no matter what i try, there is a game object with tag Enemy but it wount work function Update () { var target = GameObject.FindWithTag ("Enemy"); if ( Vector3.Distance(target.position, transform.position ) < 25) { print("found it"); } }

Viewing all articles
Browse latest Browse all 90

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>