Quantcast
Channel: Answers by "dubbreak"
Viewing all articles
Browse latest Browse all 68

Answer by dubbreak

$
0
0
Dave pointed it out, but it has to be that you don't have something assigned to your public bullet field. In the inspector you have to drag an object (with a rigidbody) onto it in the inspector. Clone is definitely null after you try to instantiate your bullet (if transform were null it'd fail on the previous line). The fact that clone is null means either you didn't instantiate anything (bullet is null) or what you did instantiate didn't have a rigidbody (so the cast failed). So check your "bullet" has a rigid body and that you have assigned it to bullet (via dragging it in the inspector).

Viewing all articles
Browse latest Browse all 68

Trending Articles



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