Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to mirror Sprite / SpriteSequence
Forum Updated to NodeBB v4.3 + New Features

how to mirror Sprite / SpriteSequence

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 270 Views
  • 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.
  • S Offline
    S Offline
    shokarta
    wrote on last edited by
    #1

    Hello,

    so i have a SpriteSequence and inside i have many Sprites,
    so, if my characters going right, for this i have the standard animation out of sprite source image...
    however if i walk left, i dont have a mirrored image for this... so i only wants to mirror the image via QML...

    Image, AnimatedImage and perhaps also AnimatedSprite does handle mirror bool attribute... however Sprite / SpriteSequence not...

    is there any simple way how to do that?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      shokarta
      wrote on last edited by
      #2

      If this helps to anyone then:

              transform: Scale {
                  origin.x: image.width / 2      not to just flip, but flip in the middle of the picture
                  xScale: -1  // 1 is for no scale... 0.5 for half size, 0 for 0 size, -1 to flip totaly vertically
                  }
      
      1 Reply Last reply
      0
      • S shokarta has marked this topic as solved on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved