I'm trying to achieve the conversion of pixel coordinates (mouse) to my local object coordinate system.
Right now the transformation is generated by love.graphics.translate, love.graphics.scale and love.graphics.rotate.
As far as i read in this forums and the documentation, there is no way to get the transformation matrix of love.graphics, isn't it?
I'd like to use something like the following:
Code: Select all
function something()
-- Converts the origin (0,0) of my transformation to screen coordinates
local sx,sy = love.graphics.transform(0, 0)
-- Converts the pixel position (100,100) to the local coordinate system
local lx, ly = love.graphics.transformBack(100, 100)
end
Am i correct with this assumption or is there something i don't see?
Regards
Felix