Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Sprite rotation question

    Help
    3
    4
    208
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lawyerlounge
      lawyerlounge last edited by

      What would the command be for flipping a Sprite horizontally?

      I have a character running to the right with the dpad, but when I want him to move to the left, the best I could come up with was rotating -180 but that flips him upside down as well...

      I searched through the commands for sprites and don't think I found anything so far.

      Anyways, what can I do?

      pianofire 1 Reply Last reply Reply Quote 1
      • pianofire
        pianofire Fuze Team @lawyerlounge last edited by pianofire

        @lawyerlounge try setSpriteScale(sprite, sprite.xscale * -1, sprite.yscale)

        As this is not very obvious we may add a flipSprite function at some point.

        1 Reply Last reply Reply Quote 2
        • lawyerlounge
          lawyerlounge last edited by

          yup that did the trick!

          Spacemario 1 Reply Last reply Reply Quote 0
          • Spacemario
            Spacemario F @lawyerlounge last edited by

            @lawyerlounge, @pianofire I'm going to be using this later tonight I think... looks like a nice trick, so you don't need to draw mirrored sprites for every frame.

            1 Reply Last reply Reply Quote 2
            • First post
              Last post