General discussion about LÖVE, Lua, game development, puns, and unicorns.
jurses
Prole
Posts: 9 Joined: Sun May 03, 2015 10:23 am
Location: Canary Islands
Post
by jurses » Sun Feb 25, 2018 9:23 pm
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.
How can I always show the character?
pgimeno
Party member
Posts: 3698 Joined: Sun Oct 18, 2015 2:58 pm
Post
by pgimeno » 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.
jurses
Prole
Posts: 9 Joined: Sun May 03, 2015 10:23 am
Location: Canary Islands
Post
by jurses » Sun Feb 25, 2018 9:55 pm
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.
pgimeno
Party member
Posts: 3698 Joined: Sun Oct 18, 2015 2:58 pm
Post
by pgimeno » 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.
jurses
Prole
Posts: 9 Joined: Sun May 03, 2015 10:23 am
Location: Canary Islands
Post
by jurses » Sun Feb 25, 2018 10:52 pm
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
Users browsing this forum: Google [Bot] and 4 guests