Page 1 of 1
camera life struggles
Posted: Fri Jun 12, 2015 2:40 am
by RBXcpmoderator12345
help me
i cant move the cam
and also 'camerax' is just a variable name, it has nothing to do with the camera's x value.
Re: camera life struggles
Posted: Wed Jun 17, 2015 5:12 pm
by Joe Black
for the camera, you missunderstood how it works
camera:set() must be called before the draw of element translated and camera:unset() return the draw to the previous position
I'm not very clear... , the camera:set rotate, rescale and translate all draw following and camera:unset() remove those action.
in love.draw in the elsif bloc do that and see the result.
Code: Select all
109 camera:set()
110 love.graphics.draw(background, 0, 0, 0, sx, sy)
111 love.graphics.draw(wires)
112 camera:unset()
113 love.audio.stop(theme)
114 night1 = true
115 if camerax == true and camNum == 1 then
116 camera:move(0.5, 0.5)
117 camOn = true
118 end
also see the attachment press q and c and it works.