Sheared canvas out of the window's range

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
jurses
Prole
Posts: 9
Joined: Sun May 03, 2015 10:23 am
Location: Canary Islands

Sheared canvas out of the window's range

Post 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?
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re: Sheared canvas out of the window's range

Post 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.
User avatar
jurses
Prole
Posts: 9
Joined: Sun May 03, 2015 10:23 am
Location: Canary Islands

Re: Sheared canvas out of the window's range

Post 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 245 times
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re: Sheared canvas out of the window's range

Post 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.
User avatar
jurses
Prole
Posts: 9
Joined: Sun May 03, 2015 10:23 am
Location: Canary Islands

Re: Sheared canvas out of the window's range

Post 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
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests