I have a prefab of a turret (which has its own collider - trigger), I also have a game boundary which is just a trigger collider (tagged GameBoundary).
I basically want a boolean to be true if turret touches game boundary.
EG:
if(turretCollider collides with collider tagged GameBoundary){
madeUpBoolean = true;
}
So if the turret makes contact with the game boundary: madeUpBoolean = true
but the function OnCollision has to be on an object that is getting collided right? I have a script that isnt attached to either of the objects. So I want to get the info from the turretCollider, and the gameBoundaryCollider
but the function OnCollision has to be on an object that is getting collided right? I have a script that isnt attached to either of the objects. So I want to get the info from the turretCollider, and the gameBoundaryCollider
– oliver-jones