animations with love2d
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
animations with love2d
Hi so im using this amazing library for love2D called anim8 its pretty good but im having alot of trouble with flipping for the left animation... I have no clue where to start and I attempted this using a number of diffrent ways but to no luck... i hope one of you can help me please
- Attachments
-
- main.love
- (900.56 KiB) Downloaded 73 times
Re: animations with love2d
Try setting animation.flippedV to true/false, or specify a negative x-scale value (sx) when you call animation:draw().
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Re: animations with love2d
Folder animX has a captial X but in code there is animx = require("animx") with lowercase x. That makes it fail on sytems that are casesensitive:
in function player:update(dt)
every frame when "a" is hold down, flipH() gets called. You only want to call it once, when the dude begins moving to the left.
The character is flickering when moving to left direction because he is quickly flipping between left&right orientation.main.lua:1: module 'animx' not found:
no field package.preload['animx']
no 'animx' in LOVE game directories.
in function player:update(dt)
Code: Select all
if love.keyboard.isDown("a") then
self.x = self.x - self.speed * dt
self.anim:flipH()
self.isMoving = true
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests