enter code herei have used capsule collider on the battery and checked IsTrigger box
The code below is part of playercollision script where on collision i want the effects to take place but nothing is happening
function OnTriggerEnter(collisionInfo : Collider)
{
if(collisionInfo.gameObject.tag == "battery")
{
BatteryCollect.charge++;
audio.PlayOneShot(batteryCollect);
Destroy(collisionInfo.gameObject);
}
}