setDrawRange not working as expected

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
bcvery1
Prole
Posts: 5
Joined: Wed Nov 12, 2014 11:18 am

setDrawRange not working as expected

Post by bcvery1 »

I'm new to LOVE2d and I'm trying to make a player icon move across a simple map. I've been following the tutorials on the wiki, and the API and I've run into a problem with drawing a range of the map. If I do not use map:setDrawRange... the whole map displays fine; however with that line in the map cuts off early (see attached images).

The map is a .lua file, made with tiled 0.10.2; it has one tiled layer. I'm running LOVE version 0.9.1 (Baby Inspector).

I have attached the .love file also.


Many thanks,
BC
Attachments
Move slightly to the right
Move slightly to the right
after.png (4.78 KiB) Viewed 3049 times
First part of map showing
First part of map showing
before.png (4.84 KiB) Viewed 3049 times
map2.love
(23.95 KiB) Downloaded 135 times
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: setDrawRange not working as expected

Post by rmcode »

You could ask for help in the STI thread since it seems to be an issue with the library.
bcvery1
Prole
Posts: 5
Joined: Wed Nov 12, 2014 11:18 am

Re: setDrawRange not working as expected

Post by bcvery1 »

Thanks rmcode, I did that and got an answer. The solution was to use the same translation in setDrawRange as with love.graphics.translate

Which seems obvious now I see it!
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 3 guests