Skip to content

Instantly share code, notes, and snippets.

@tomvangreen
tomvangreen / CameraManager.java
Last active November 12, 2015 13:23
LibGDX CameraManager
package space.util;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.utils.viewport.Viewport;
/**
* Initialize the CameraManager with viewport and camera and use it to set
* target position and zoom for your camera. The CameraManager will smoothly