How to check collision of a different game object

I have a game manager that I want to check if a different game object has been collided with. Is there any possible way of doing this?

You can manually run overlap tests using overlap sphere/overlap box, but this is a scenario where GameMnaager doesn’t make much sense. The object will be notified upon collision (OnCollisionEnter/OnTriggerEnter). So you could store this data in the object, and then let GameManager act on it.

2 Likes

As neg says, hook into the monobehaviour OnTriggerEnter/OnCollisionEnter callbacks, and then from there if you wanted you can have the game manager react / use that information. If you do that approach, you can hook up the game manager to the object in question via an action/event, which is probably one of the cleaner and easier ways to make that connection

2 Likes