Hi Everyone,
This is my 1st post. 1st I wanna say im loving the unity engine, I’m creating a few games at the moment, just to try out a few different ways of working in the engine ^____^, hoping to port a few of these over to the IPhone once i get enough scripting in me.
Now I’ll move onto my problem, i can get enemies to appear, I can get enemies to die when I shoot them, but the enemy im trying to create shoots outwards, not in any specific direction, ie he shoots 20 bullets (there are all alpha planes…the same used multiple times) and they fire outward omni style, how Would I go about programming this in?
Hopefully this image I attached to the post should help clear up my rather horrid explanation, this is the only example I could find, be sure that mine wouldn’t be half as extreme as this…I just mean a single row of things encircling the character (if that makes sense).
My 1st thought (I’m not going to be back at home until tomorrow to try this out but this is only 50% of it anyway), is to manually place for example 20 objects around my enemy, and make a prefab from those,that sorts how to have the objects, as im confident I’d have to use a prefab for these anyway. But that doesnt solve how to fire them ouwards in all directions, firing in just +x is simple as is just +Y but how do i do plus AND minus x and plus AND minus y? And would this confuse unity completely?
My 2nd thought is to have the same object, multiply it several times, with each version rotated a little, this way when the enemy shoots in the y direction, due to the objects being rotated, their axis would be off, so the bottom one would shoot straight down and the left, right, etc ones would shoot straight down too, however due to them being rotated their “down” would actually be another direction I’m not sure if I’m explaining this very well at all actually).
Thanks all I can come up with, the 2nd idea seems the most likely idea outside of using particles, but particles are a little more cpu intensive, and I’d rather avoid them If I can.
I understand using planes with Alpha’s is often CPU intensive, I have shadows and all lighting completely turned off, so nothing is actually communicating with the alpha channel at all, and Im also not using pixel perfect collision, im just using simple primitives for collisions inside the solid part of the alpha.
I hope someone can help, even though im not at my PC right now, its irritating me as I cant seem to think of the best and least CPU intensive way of doing this.
Thanks
Dan[/url]
