I am currently creating a 2d Top down 2 thumb joystick space shooter game, but the player can explore an infinitely large space… but it seems kinda boring just to make the background to parallax… so I need to add a particle system which can do the following things but I cant seem to find a tutorial which implements this… Though I saw this tutorial Creating an Infinite Star Field - Unity Space Shooter Tutorial #04 - YouTube But still I cant make it work for a 2d top down space shooter game…
I want the particle effects to have the following features…
1)It must not be a dot or spec it should be a thin streak of particle effect(a small white line) whose length should be the proportional to the speed of the player.
2)It should always come from the direction the player is moving not the direction the player is seeing (i.e. if the player faces left direction but moves towards top then the particle effects should come from top that way indicating the direction the player is actually moving.)
3)Though I am using an orthographic camera it could be better if the particle effects were to parallax…
The only thing I can think of to simulate this style of effect, is to make a png, with a dot on it…
Then make a script that stretches it and contracts it as the players movement speed changes… and then use the built in Face command, to always face the player (When it’s first instantiated).
Use a pooling system that just instantiates a small plane or decal in random spots.
Have it disable itself when it’s off the screen.
@Vickylance
You could use the standard particle system, but instead of making its scale:
x:1 y:1 z:1
you could stretch it (assuming you’re looking down, so x and z vertices are visible) to something like
x:1 y:1 z: 2 * movementSpeed
You may want to change the value of z according to the effect you want, but I tried this and it seems to work reasonably well.
I am assuming there is a player object that you “move forward” in your script somewhere, this determines where the player is moving, so attach your star field to the player object and it will always come from where you’re moving to.
Alternatively, create an object, to attached the star field to and change it’s rotation on the y access (again, assuming looking down) to face where you want.