How to prevent particles move with the emitter?

I have a spaceship firing particles. I used a particle system to implement the fire gun. When the player hits fire button, the particle system plays, and when the button is released, the system stops emitting. The problem is, when I move the ship while firing, the particles are affected as well, moving with the emitter after they are fired from the ship. How can I fix this? Is there any other way than instantiating game objects for bullets?

I remember there being a setting telling the particle system if it should be in local space or world space.

For Shuriken, I think it’s the “Simulation Space” property.

Use a prefab. Have a prefab for your bullets with a simple script attached to it. You can use this, a simple one that I was given:

using UnityEngine;
using System.Collections;
 
public class Bullet: MonoBehaviour {
 
    public float speed = 8.0f;
    public AudioClip hitSound; // add a hit sound, if desired
 
    void Start(){
        Destroy(gameObject, 6); // suicide in 6 seconds
    }
 
    void Update(){
        // move the bullet forward at speed units/second
        transform.Translate **(Vector2.right * Time.deltaTime, Space.World)**;
    }
 
    void OnTriggerEnter(){ // hit something:
        // play the hit sound, if any...
        if (hitSound) AudioSource.PlayClipAtPoint(hitSound, transform.position);
        Destroy(other.gameObject); // and die
    }
}

After that, have an empty GameObject where the bullet is supposed to fire out of (gun barrel, rocket launcher, etc…) and attach this script onto it:

using UnityEngine;
using System.Collections;

public class ShooterScript : MonoBehaviour {
	
	public GameObject fireNode;
	public GameObject projectileBullet;
	
	void Update () {
		if(Input.**GetButtonDown**(KeyCode.Mouse0)) {
			Instantiate**(projectileBullet, this.transform.position, Quaternion.identity)**;
		}
	}
}

Now all you have to do here is add a collider to your bullet/projectile GameObject, and add the first script to the bullet/projectile prefab. Next, add the second script to the empty that is at the location where the area is that the bullet/projectile will be fired out of. Finally, in the inspector window, add the bullet/projectile GameObject to the “projectileBullet” area, and add the empty that this script is attached to in the “fireNode” area.

Hope that helps! Comment if you need further assistance.