vrld / hump

LÖVE Helper Utilities for Massive Progression
http://hump.readthedocs.org
1.09k stars 154 forks source link

Camera documentation missing explanation about some parameters - worldCoords #113

Open zell2002 opened 5 years ago

zell2002 commented 5 years ago

Firstly, massive fan of your libs, been using for many years to build stuff at home. Im currently playing with having multiple Canvas' with different objects being drawn, and each having its own Camera. My idea being I can click a Canvas, and move the camera around/zoom in n out

Moving camera and zoom both work. But I'm trying to add camera drag using mouse button, but the worldCoords and cameraCoords don't appear to be working in this context. I've deffo used them before, and Im curious if it's because I'm not understanding all the params that can be passed in.

function camera:worldCoords(x,y, ox,oy,w,h)

What are ox and oy, and what are they used for specifically? Also, do I need to provide width/height? As in, if I have a canvas that is 300x300, does the Camera that is rendering it, need to know that as well?

Cheers again for all your great work!