How do I flip a sprite using 8-Directional

  • So, I'm making a Nuclear Throne like game, and I'm trying to get the sprite to look with Left or Right depending on the direction the sprite is facing while using 8 Directional controls. I know how to do this using Platform, but not 8-Directional, is the process similar?

    Another thing I'm attempting to do is make the sprite follow my cursor, and flip depending on the location of the cursor (If it's behind the sprite, it would look left and vice versa.) However the conclusion falls the same like the first questing, I have NO clue how to do this!

    Any help would be appreciated

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think the most accurate method would be checking Sprite.8Direction.MovingAngle property:

    Sprite Is moving
        System-> Is between angles -> Sprite.8Direction.MovingAngle between -45 and 45 : Sprite set Not Mirrored 
        System-> Is between angles -> Sprite.8Direction.MovingAngle between 135 and 225 : Sprite set Mirrored 
    
    etc.[/code:12oaxiz6]
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)