Search Unity

how can i change the colour of one 2d sprite based on collision of 2 other sprites?

Discussion in 'Scripting' started by nitrofurano, Aug 21, 2019.

  1. nitrofurano

    nitrofurano

    Joined:
    Jun 7, 2019
    Posts:
    92
    using only one csharp script inside an empty object (if possible), in this code, how can i change the colour of one 2d sprite based on collision of 2 other sprites, in a simple example only doing that? and also (if posible), having the console logging all the resulting information? thanks in advance!
     
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
  3. nitrofurano

    nitrofurano

    Joined:
    Jun 7, 2019
    Posts:
    92
  4. nitrofurano

    nitrofurano

    Joined:
    Jun 7, 2019
    Posts:
    92
    i'm struggling to go further than this (made on version 2019.3.0a12)
     

    Attached Files: