Hey,i am making a game and i want oil drum to fall when the player enters the trigger,please how can i change the time it takes for each drop when the player enters the trigger?,i have an image and c# script attach below thank you.
[9433-untitled.jpg`|9433]
using UnityEngine;
using System.Collections;
public class OilDrumFall : MonoBehaviour {
public Rigidbody DumPrefab;
public Transform LandingSpot;
void OnTriggerStay(Collider target)
{
if(target.tag == "Player")
{
{
Instantiate(DumPrefab,LandingSpot.position, LandingSpot.rotation);
}
}
}
}
`