Lua

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
edu
Prole
Posts: 7
Joined: Sat Apr 06, 2024 2:21 pm

Lua

Post by edu »

sup guys, for some reason, my character image doesn't render on love 2d windown. My other project is working fine but, in this one, it doesn't. can someone help me?

posX = 250
posY = 250
tam = 1
ori= 120
angulo = 0

love.graphics.toggleFullscreen = true
function love.load()
PlaImg = love.graphics.newImage("Imgs/char.png")
love.mouse.setVisible = false
end

function love.draw()
rot = angulo
love.graphics.draw(PlaImg, posX, posY, rot, tam, ori, ori)
end
User avatar
keharriso
Party member
Posts: 109
Joined: Fri Nov 16, 2012 9:34 pm

Re: Lua

Post by keharriso »

You need to pass the scale twice, one for X and one for Y:

Code: Select all

love.graphics.draw(PlaImg, posX, posY, rot, tam, tam, ori, ori)
LÖVE-Nuklear - a lightweight immediate mode GUI for LÖVE games
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Lua

Post by togFox »

Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Post Reply

Who is online

Users browsing this forum: Google [Bot], Hugues Ross and 9 guests