Stalker-x with translate and scale mouse help
Posted: Mon Feb 19, 2018 10:40 am
I need help,
im using stalker-x camera lib, im also using translate and scale as follows:
Before that, i have a clickEntity function, which checks if i clicked on an entity, but now after using camera and translate and scale, i cant get the proper coordinates for checking
im using stalker-x camera lib, im also using translate and scale as follows:
Code: Select all
function love.draw()
lg.push()
lg.scale(game_ratio)
lg.translate(windowWidth/2/game_ratio-gameWidth/2, windowHeight/2/game_ratio-gameHeight/2) --this draws the game in the center of the window
Camera: attach ()
--other draw stuffs
Camera:detach()
lg.pop()
end