Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]cam:setPosition does not work in huge world #7

Closed
Creeper9207 opened this issue Dec 29, 2017 · 1 comment
Closed

[bug]cam:setPosition does not work in huge world #7

Creeper9207 opened this issue Dec 29, 2017 · 1 comment

Comments

@Creeper9207
Copy link

Creeper9207 commented Dec 29, 2017

I absolutely love this library, and I don't think my game will work without it, but I am encountering a problem.

The camera's creation line is as such:
local cam = gamera.new(-700000,-700000,700000,700000)

but when drawing:

  --cam:setScale(.25)
  cam:setPosition(charx*4,chary*4)
  --cam:setAngle(charr)
  
  
  
cam:draw(function(l,t,w,h)
  
  love.graphics.draw(stat, 200, 200, 0, .3, .3, stat:getWidth()*.5, stat:getHeight()*.5)
  love.graphics.draw(char,charx,chary,charr, .3, .3, char:getWidth()*.5, char:getHeight()*.5)
  
  end)

cam:setPosition does not set the position to the character's location, instead the location stays at (-400, -300)

The character is moving to its own position, so I know it isn't a problem with my code, please help.

@kikito
Copy link
Owner

kikito commented Jan 2, 2018

Hi, I'm sorry, but there is nothing I can do here. It seems like a limitation on the hardware or in OpenGL. You will have to make your words a bit smaller.

@kikito kikito closed this as completed Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants