when touching object, how to put an action on that same object?? and it would effect on another object too

when touching object, how to put an action on that same object?? and it would effect on another object too
when touching object, how to put an action on that same object?? and it would effect on another object too

Hi, I would suggest you to follow this tutorial:

Even if you aren’t building an adventure game the techniques applied may help you. If not you could research a bit on Colliders and Raycasting.

Hope it helps