Search Unity

Change sprite color in the intersection of the collision

Discussion in '2D' started by andrellsilveira, Sep 9, 2019.

  1. andrellsilveira


    Sep 9, 2019
    Hello everyone

    I would like know how I could change the sprite color only in the area where is occur a collision between two objects, in the intersection of the colliders, per pixel, for exemple: I have two blue 2D objects with circle colliders, when they colide, I want change color to red in the intersection of the collision, where the restant part of the images continue blue.
    Could somebody help me in this question?
    I apologize for my english.

    Thanks! :)
    Last edited: Sep 9, 2019