i have a problem with my destroyed prefab.
It works fine if you hit the target dead center but if you hit a corner or maybe too low
it will spawn hundreds of the destroyed prefabs. here is a link to a player that you can test out for yourself.
http://dl.dropbox.com/u/24888393/WebPlayer.html
arrow keys for movement a and d for turret
q and e for gun raise or lower
and w for firing
thanks
wayne
Wayne,
So, basically, what we thought was correct.
You must do a good ol’ Destroy(gameObject) in there so that the actual model goes after it instantiates a new one, or else it’s reading a collision a LOT. Pretty much once every frame (I think that’s how Update works?).
So, put that in there, here’s some docs, and it should work, some form of that or another. Do it on bullet too. I’d recomend doing a tag check though too, to make sure that it’s a bullet and not a tree or rock or something with a collider. You can Google a bit on tags and how they work, very helpful. If you need more help, don’t mind asking =).
Have a good night!