What to use instead of collisionInfo in OnTriggerEnter?

In OnCollisionEnter, I can use collisionInfo to access information in the object it collided with. How can I do this in OnTriggerEnter?


Any help would be greatly appreciated :slight_smile:

Hi @LightningStorm102

I’d recommend you check the introductory videos first:

This is the manual page for OnTriggerEnter:

If you did read it, you know you’ll get Collider.

Then you can access this collider like it is explained in the docs:

var go = other.gameObject
var name = other.gameObject.name;
var rb = other.GetComponent<Rigidbody>();