Quantcast
Channel: Answers by "weltraumaffe"
Browsing latest articles
Browse All 8 View Live

Answer by weltraumaffe

`GameObject.Find()` finds only one GameObject. With `GameObject.FindGameObjectsWithTag()` you can find every Game Object with a specific tag. Beware: Find functions are very slow and shouldn't be used...

View Article


Answer by weltraumaffe

With `gameObject.FindComponentsInChildren(MeshRenderer)` you can find all mesh renderers in children of the gun. This method is very slow so you should use it in Start() once and not every time you...

View Article


Answer by weltraumaffe

Could you check in the Hierarchy if the Camera has the MainCamera tag attached to it? If not then `Camera.main` is not set (null) You should use `ScreenToWorldPoint`, you want to convert a position...

View Article

Answer by weltraumaffe

You should either use a GUI (and transform the WorldCoordinates to ScreenCoordinats and draw a label there). Or you should make the gameobject with the text a child of the object where it should be...

View Article
Browsing latest articles
Browse All 8 View Live


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