Color Change On Collision

Discussion in 'How Can I...?' started by dnmrr, Feb 13, 2020.

  1. dnmrr

    dnmrr Boxer

    Joined:
    Jan 10, 2020
    Messages:
    37
    Likes Received:
    5
    Hello!
    I'm trying to make my character change color on collision with another object. If collides again change back to the original color
    I set the character node map like this: if collide(w/the other obj)----> state machine----> switch---->set colorx2(color, original color)

    but it won't work. Does anyone have any idea how could I make this work?
    change color on collision, but if it collides again, change to the original color.

    2d world, bb3
     
  2. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    Problem here is that in SetColor node, it uses setColor() function, which works only for 3D models.
    For Animations, there should be some other function.
    Anyone knows, what function is needed to change animation's node color?
     
    dnmrr likes this.
  3. dnmrr

    dnmrr Boxer

    Joined:
    Jan 10, 2020
    Messages:
    37
    Likes Received:
    5
    Yes, the setColor node only works for 3D models.
    If anyone wants to do this in 2D world, just use the 3D World with flat models.
    I achieved the colorChange using IfCollide-->Switch<A: Set Color B: Set Color
    That work just fine for me.
     

Share This Page