Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Sprite depending on Player's position

Discussion in 'General Graphics' started by Grafer, Jul 2, 2017.

  1. Grafer

    Grafer

    Joined:
    May 30, 2015
    Posts:
    18
    Hello.
    What would be the best solution to make object's sprite change depending on player's position?
    I have a 3D World, but my enemies are flat 2D Sprites facing camera (bilboards).
    I've prepared 4 sprites for my enemies (back, front, left and right) and I'm wondering how to make them change depending on where player stands.
    i.e. When enemy is going towards us we see his front, but lets say that enemy is going same direction, but we're standing behind him, we would see his back.
    Should I just use couple of conditions checking where my player is, if distance is shortening or not etc?
     
  2. Grafer

    Grafer

    Joined:
    May 30, 2015
    Posts:
    18
    is bump working?
     
  3. brianasu

    brianasu

    Joined:
    Mar 9, 2010
    Posts:
    368