Standard ParticleSystem(Wildfire) does not work with Click to Move script

I have imported the standard particle systems → Wildfire and child it to my player model. The player model is moved with mouse clicks. I have another script that move the character with WASD. The wildfire particle systems is supposed to leave a trail of fire as the character is moving. It works when the character is moved with WASD, but when the character is moved with mouse clicks, there is no trail of fire.

In the scene view, when I manually moved the character with the toolbar translate axes (the x,y,z axes), there is a trail of fire. Back in the Game view, when the model is moved with mouse clicks, there is no fire trail.

Any advice please? Appreciate any help on this.

Thanks!

you will need to tell us how wasd is dropping the particle. if you can put that code in a public function. then access the the function when the mouse is clicked

Code for character movement using wasd:

private CharacterController characterController;
private float moveSpeed = 5.0f;

void Start ()
{
characterController = GetComponent<CharacterController> ();
}

void Update ()
{
Vector3 movementDirection = new Vector3 (Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical"));
            characterController.SimpleMove (movementDirection * moveSpeed);
}

The Wildfire asset comes with Unity under Assets->Import Packages->ParticleSystems. After importing it, I dragged the wildfire prefab to the player character in the hierarchy, making it a child of the player character. Start the game, and there is a trail of fire as the character is moved around with wasd. There is no code referring to the wildfire particle systems. After swapping the wasd movement code to click to move code and CharacterController component to Nav Mesh Agent component, there is no fire trail as the character is moved around. The only change was the movement code and swapping of the CharacterController component to Nav Mesh Agent component.

Thanks !

After experimenting with the various components on the character, it seems that rigidbody component is interfering with the particle systems. These are the repeatable test results:

  1. If rigidbody is absent, the fire trail appear as the char moves around.
  2. If rigidbody is present and use gravity is not checked, the fire trail is absent.
  3. If rigidbody is present and use gravity is checked, the fire trail is present.
  4. if rigidbody is present and use gravity is not checked and checked during runtime, the fire trail is absent and then appear as use gravity is checked.
  5. if rigidbody is present and use gravity is not checked and then checked during runtime, followed lastly by unchecking the use gravity, the fire trail is absent until the use gravity is checked, and after the use gravity is unchecked, the fire trail is still present.

Appreciate any insight on this. I can’t figure this out.

Thanks!