Sorry for the basic question, but if we have a script inside of an object with a collider, how can it react to the object with a tag named weapon? I’m not asking for help doing something with the object that has the tag, but how do I get it to detect the weapon so I can then do something with it?
void OnCollisionEnter(Collision other)
{
if(other.tag == “weapon”)
{
DoSomething();
}
}
Check the Script Reference for OnCollisionEnter for UnityScript and C# examples.