Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Object reference not set to an instance of an object... again

$
0
0
So first what is the goal of my code? Helicopter 1 fires a rocket on helicopter 2. In flight the rocket shoots a ray onto the target helicopter. Now i want helicopter 2 to recognize when a rocket is flying towards him so i wrote this: if(Physics.Raycast(transform.position, fwd, out hit)) { hit.collider.gameObject.GetComponent

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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