Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Shuriken particle effect in 2d, setting local scale does not work the same...

Discussion in '2D' started by codejoy, Dec 30, 2014.

  1. codejoy

    codejoy

    Joined:
    Aug 17, 2012
    Posts:
    204
    I am wiring up projectiles to my player. The simple sprite projectiles work fine. I make them fire from a point on my player sprite and they are drawn the right direction and move the right way by setting their localScale to that of the player. This all falls apart when I try to do my flamethrower (not exactly a projectile) but I have these cool 8bit flames I found as a particle. The problem is I had to already:

    A) scale it down using a particle scaler I found on the asset store.
    B) set all the modules force over life time space to local from world.
    C) If i rotate it the right direction (it came pointing up) i have to rotate on the Z axis...most things in the 2d games are rotated on the Y.

    So now if i futz with the localScale on the effect (its attached to an empty game object) it doesn't rotate pointing left or right by setting the local scale x from 1 to -1 etc. So I have to rotate it, the other thing which is super strange is setting the transform.position of the empty game object the particle system is connected to totally doesnt match like setting the positions of the other sprite based projectiles.

    I guess my question is does the shuriken particle system not play well with 2d unity, or are there tricks I have to implement to get it to work like my other sprites so lining stuff up and having the localScale setting direction etc works better?
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    If the cool 8bit flames you found are already set up in a particle system, couldn't you just recreate the particles from scratch using the "cool 8bit flames you found" as the sprites?