Search Unity

Question Particle Not Moving with Parent Object

Discussion in 'General Graphics' started by realfurbz, Nov 14, 2022.

  1. realfurbz

    realfurbz

    Joined:
    Oct 6, 2021
    Posts:
    7
    Hello,

    I am trying to instantiate a particlesystem at a specific position when I click LMB to shoot a gun in my game (muzzleflash). I also want the particles to follow their parent game gameobject while the particle is still active. As shown in the video, the particles lag behind the muzzle position when I am moving.

    My particle instantiation code is simple:
    Code (CSharp):
    1.     private void shootBullet()
    2.     {
    3.         Instantiate(shotFX, muzzleLocation.position, Quaternion.identity, muzzleLocation);
    4.     }
    Here are the settings for the particle, everything below where you can see is not enabled.
    https://ibb.co/Lnqf9Qm

    I have tried changing render -> render alignment to local but it didn't fix the issue.