Search Unity

Particle system effect moving with parent object

Discussion in 'General Graphics' started by IvyKun, Feb 15, 2018.

  1. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Hi,

    I have a bullet with a muzzle effect as a child. I've set the particle simulation space to world so when the bullet is fired you se the muzzle right next to the gun, but the muzzle effect is still moving with the bullet. The bullet is just an empty object that moves with transform.translate.

    Here is the object:



    And here is the particle:



    Any idea why this is happening? I've used particles a few times with world space with no problem. But a few months ago with older versions of Unity. I'm using Unity 2017.3.1.f1. I don't think it's a bug, probably something I'm missing but I can't find it.

    Thanks!
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Can the muzzle flash be parented to a EGO at the end of the weapon rather than parented to the bullet? I'm guessing you have a good reason - but off hand I can't think of one. ;)
     
  3. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Yeah it can be parented to the weapon (I think this is the proper way to do it) or just spammed from a pool of effects at the weapons end. That works fine.

    I was using this approach to be able to have different muzzle effects for different bullets. And also because it was easy and quick to prototype :p

    Anyway that should be working and I still don't know what I'm missing :(
     
    ArminJohansson and theANMATOR2b like this.