Collision with gradient color proximation

Hi all, my goal is in collisions between meshes add a gradient color (red with total collision and green closest collisions) like this: http://www.youtube.com/watch?v=7PsM-LGLXiQ&t=1m55s
Is possible do this ?

Thank you very much!

Hey, to achieve that, you can leverage depth buffer eg.:

  • render mesh one
  • set depth buffer to “equal” and render mesh two with the material you want for the “collision zone”
  • set depth buffer to “less” and render mesh two again with its material

Hi @Deltakosh you have some sample where i can learne more about this approach ?

Thanks a lot!