Collision With Objects In Array

Hey quick question, I have an array of game objects and I store them in an array and I’m wondering how can I check which object in that array is being collided with another object.

Also am I able to use the OnCollisionEnter() function or would I do this in the update()?

Thanks,

kubapl

Each object needs its own OnCollisionEnter function. If you want a global array, you could have the objects register collisions in an array controlled by some manager object.

–Eric