I’m trying to create shooter-style bullet using particle and raycast by instantiating particle at gun end point. Everything is fine untill I start rotating or moving: It seems that bullet instantiated at previous frame at poitn where I been a frame ago (see video). What is the best practices to draw bullets?
Instantiate(traceParticle, gunEnd.position, Quaternion.LookRotation(bulletDestination))
My particle settings:
You should not instantiate the particle prefab per fire because it undermines performance. Either way, you should parent the effect to your gunEnd object . First change your particle simulation space to World. Second enable “looping” of the system. Each time you stop fire, use ParticleSystem.Stop() to literally stop emitting bullet particles, this function does not kill still-alive particles by default. When you fire again, just use ParticleSystem.Play() to resume.