Hello everyone,
I am using below script to boost car speed for a fixed duration on trigger enter:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TriggerJumpBoost : MonoBehaviour
{
public float boostForce = 10;
public float boostDuration = 1;
void OnTriggerEnter(Collider other)
{
if (other.tag == "Car" && other.GetComponent<CarController>())
{
StartCoroutine(other.GetComponent<CarController>().I_JumpBoost(boostForce, boostDuration));
}
}
}
and it’s working great. Recently I added boost partical system in car and I want to start partical system during “boostDuration”. Please help me on modifying above script to achieve my goal. I am new in scripting and partical system. and please tell me what i need to do behind the script also.
Car spawn on runtime on start of race. Partical system is inside car. There are 2 partical systems inside every car and there are 4 cars.
Thanks.