Rigidbody Collision detection

Hey ,

i have a rigidbody as a Player and i want if the rigidbody collide with another rigidbody and have the tag “gravityChange” to make an event.

how can i do this with Javascript ?

Note: the Player must be a rigidbody in my situation.

You use function OnCollisionEnter to check if the rigidbody hit another rigidbody with the tag “gravityChange” and carryout events accordingly.