|
Is there any way to get from EmptyGameObject, what he hitted and where? Not loosing FPS, for example for scene, where going to be, more than 1000+ bullets (for IOS). Gun Script (that shoots empty game objects with sprite on them):
(comments are locked)
|
|
You can use Raycasting. Your bulletPrefab should have a script that tests if it hits something (this requires the objects you want to hit, to have a collider). The bullet script could look like this: thanks man! Perfect!
Jul 11 '12 at 10:54 AM
seashell
(comments are locked)
|
|
Yes, if you are using raycasting, you can save the points (Vector3). Which afterward you can use for anything you would like. I wouldn't save all of the points, for as you said, it will decrease the FPS and performance, however, you can use just one variable for a point and use it to "capture" each of the shots.
(comments are locked)
|
