List of usage examples for com.badlogic.gdx.graphics Camera lookAt
public void lookAt(float x, float y, float z)
From source file:com.ridiculousRPG.camera.CameraTrackMovableService.java
License:Apache License
/** * Centers the camera to the tracked object (event) *///from w ww . j ava2s .c o m public void centerTrackObj() { if (trackObj == null) return; Camera cam = GameBase.$().getCamera(); cam.lookAt(trackObj.getCenterX(), trackObj.getCenterY(), 0f); cam.update(); oldX = trackObj.getX(); oldY = trackObj.getY(); }