Hey!
I've been trying löve for the past few days and I can't seem to find a way to draw an animation inverted in relation to the Yy axis. Do I have to have separate animations for left/right facing character?
Thanks!
Animation drawing?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Animation drawing?
Hi!
See love.graphics.draw. If the fifth argument (sx) is negative, it is flipped horizontally, so you can do something like:
Hope that helps.
See love.graphics.draw. If the fifth argument (sx) is negative, it is flipped horizontally, so you can do something like:
Code: Select all
love.graphics.draw(something.image, something.x, something.y, 0, something.dx < 0 and -1 or 1)
Help us help you: attach a .love.
Re: Animation drawing?
Also too more things to what robin said. Remember that flipping the image isn't good if let's say you character isn't a symmetrical Image. if you have an sword in right hand flipping/inverting will show sword then in left hand.Surgeon wrote:Hey!
I've been trying löve for the past few days and I can't seem to find a way to draw an animation inverted in relation to the Yy axis. Do I have to have separate animations for left/right facing character?
Thanks!
Also remember that LOVE don't do image animation as default (like using a GIF). You will need to use some animation library or create a simple one of ours.
Re: Animation drawing?
In relation to what coffee wrote..
If you have a character which is non symmetrical and is made up of >1 shapes, when it is flipped, the shape, body, fixtures dont flip with the image. Does anyone have a solution to this?
If you have a character which is non symmetrical and is made up of >1 shapes, when it is flipped, the shape, body, fixtures dont flip with the image. Does anyone have a solution to this?
wat ya mean she's in another castle!?
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests