Hi there. I'm having some trouble with scrolling and I have no idea why this is happening. I made two gifs to explain it. When I scroll the screen, the arrow keeps changing its position/tripping for no reason. I was wondering if this is vsync's fault or something like that. Any help would be appreciated.
Scrolling issue
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Scrolling issue
Are you flooring your coordinates? I'm guessing that the arrow is at a position like 1.6 and the level is at 1, so when you scroll 0.4 to the left the map get's floored to 1 and the arrow is floored to 2 or something like that
If you want to make a pixel perfect game always floor your coordinates
If you want to make a pixel perfect game always floor your coordinates
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Scrolling issue
Oh, man. I was so traumatized about flooring coordinates since I tried to do it in a collision system that flooring in love.draw never crossed my mind. Thank you!
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Scrolling issue
Haha that's great!
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Who is online
Users browsing this forum: Bing [Bot] and 82 guests