- Home /
Question by
SwanMaster · Dec 30, 2021 at 03:21 AM ·
particlesystemparticle system
How do I make my rocket emit fire particles on movement
please help me find out whats wrong with my code, im new to this thanks :D
private ParticleSystem.EmissionModule emission;
public ParticleSystem fire;
private ParticleSystem.EmissionModule fireEmission;
public float thrustSpeed = 10.0f;
public float turnSpeed = 3.0f;
private Rigidbody2D _rigidbody;
private bool _thrusting;
private float _turnDirection;
private void Awake()
{
_rigidbody = GetComponent<Rigidbody2D>();
}
private void Update()
{
_thrusting = Input.GetKey(KeyCode.UpArrow);
// below is where im stuck, fire particles wont show :(
if (Input.GetKeyDown(KeyCode.UpArrow))
{
fireEmission.enabled = true;
}
if (Input.GetKeyUp(KeyCode.UpArrow))
{
fireEmission.enabled = false;
}
Comment
Your answer
Follow this Question
Related Questions
Particle System appearing fine in scene, but is partially visible in Game 0 Answers
How to make particles always face away from player 0 Answers
Make Start Color setting in particle system control _EmissionColor 1 Answer
How can i accomplish fog at the edge of my map. 0 Answers
Adjusting OnTriggerEnter2D() for OnParticleTrigger() 0 Answers