Hello all! I've stumbled upon an interesting problem. Maybe somebody will be able to help.
So in my game you can shoot lasers. Laser disappears in a fracture of second after it hits the target and spawns a trail of particles behind. X randomizer of that particles is equal to laser's width, Y randomizer is equal to 2 and rate is equal to int(laser.width / 8). It looks like this:
Everything looks fine until laser's are horizontal but particles always spawn in a horizontal line even when the laser is vertical or diagonal. Rotating particles object itself doesn't help. It looks like this:
Instead of this:
What is the best way to achieve this effect? Spawn separate sprites perhaps? But how can I spawn objects along the line? Thanks in advance!