- Home /
Particles and 2D games
Hello. I am working in an 2D shoot'em up and when enemies die, an explosion of particles happens. But what I want is:
For these particles to fly only along the X/Y plane, and not in all of the 3 axis.
For these particles to collide with my player.
But, about the second thing, I just use 2D physics in my game and, according to what i've read so far, Shuriken Particles cannot collide with it, right?
So I've figured that I'll have to use something else instead of particles in this case. I wish someone can point me a direction for me to start programming it then.
Answer by brilliancenp · Feb 26, 2014 at 06:28 PM
I would think that if you are making a 2D game that the particles flying in the z direction wouldn't matter since it won't be visible to the player. If it really matters you can get into scripting the Shuriken system. I have essentially scripted this before and it works great. There are a few tutorials around about this, most of them script in 3d but all you have to do is put zero for the z dimension for each particle. I have gotten pretty good at this so if you want a starting point just ask.
I have never made a 2D game in unity but I believe you should be able to put a 3D box collider on your 2D object to allow the particles to collide with.