AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.41k stars 288 forks source link

Find Camera Viewport #688

Closed SirePi closed 6 years ago

SirePi commented 6 years ago

Implementing issue #681. In addition, added a shorthand FocusPos property to have quick access to the current focused position of the Camera.

SirePi commented 6 years ago

Might have an issue.. at the moment I am calculating the corners with a different imageSize starting from the top left = (0,0).. should I center the imageSize on the screen first instead?

ilexp commented 6 years ago

Might have an issue.. at the moment I am calculating the corners with a different imageSize starting from the top left = (0,0).. should I center the imageSize on the screen first instead?

Not 100% sure that answers the question, but the rect of imageSize should be centered around the camera position, so that the rects center is the focus point of the camera.

SirePi commented 6 years ago

Should be done