One of the in-game weapons I want to have for the player is some sort of cluster missile – basically, you fire one projectile, and it explodes and creates a couple more projectiles, which explode, and so on. I’m trying to document how I do this, so here goes:
I created a simple projectile in blender that sorta looks like a missile (it’s really just a cylinder with the center vert pulled out of one of the ends. I imported the model and created an empty game object to contain the model. This way, it’s easy to transform the model and attach custom scripts to it.
The empty object has the actual script attached to it. You can find it here:Â http://pastebin.com/yZpRyJkq
Basically, each missile spawns copies of itself and rotates the copies. I’ll probably add some sort of explosion effect, and change the model so that it doesn’t look so terrible.
Here’s what it looks like: