Page 1 of 1

Sheared canvas out of the window's range

Posted: Sun Feb 25, 2018 9:23 pm
by jurses
Image

There's the character, a white square with red border I can move.

But when it is out of the window size, (is it being followed by the camera), it disappears.
Image

How can I always show the character?

Re: Sheared canvas out of the window's range

Posted: Sun Feb 25, 2018 9:50 pm
by pgimeno
Hard to say without seeing your code. If you're drawing your character to a canvas, you can draw it to the screen instead. If you're using a scissor, you can remove the scissor before drawing it.

Re: Sheared canvas out of the window's range

Posted: Sun Feb 25, 2018 9:55 pm
by jurses
pgimeno wrote: Sun Feb 25, 2018 9:50 pm Hard to say without seeing your code. If you're drawing your character to a canvas, you can draw it to the screen instead. If you're using a scissor, you can remove the scissor before drawing it.
Sorry I thought it was uploaded.
cocheSinJ.zip
The code
(653.01 KiB) Downloaded 246 times

Re: Sheared canvas out of the window's range

Posted: Sun Feb 25, 2018 10:25 pm
by pgimeno
Yes, as I said, draw the character to the screen instead of a canvas.

Code: Select all

-- Just replacing this:
love.graphics.draw(canv2)
-- with this:
carRender()
-- and removing this from carRender:
love.graphics.clear()
-- works.
You don't need canv2 at all.

Re: Sheared canvas out of the window's range

Posted: Sun Feb 25, 2018 10:52 pm
by jurses
pgimeno wrote: Sun Feb 25, 2018 10:25 pm Yes, as I said, draw the character to the screen instead of a canvas.

Code: Select all

-- Just replacing this:
love.graphics.draw(canv2)
-- with this:
carRender()
-- and removing this from carRender:
love.graphics.clear()
-- works.
You don't need canv2 at all.
thank you