/** * Sets the max zoom distance of the camera (default is 40) * * @param maxDistance */ public void setMaxDistance(float maxDistance) { this.maxDistance = maxDistance; if(initialized){ zoomCamera(distance); } }
/** * Sets the min zoom distance of the camera (default is 1) * * @param minDistance */ public void setMinDistance(float minDistance) { this.minDistance = minDistance; if(initialized){ zoomCamera(distance); } }
public void onAnalog(String name, float value, float tpf) { if (isEnabled()) { if (canRotate) { if (name.equals(CameraInput.CHASECAM_MOVELEFT)) { horizontalRotation -= value * rotationSpeed; rotateCamera(); } else if (name.equals(CameraInput.CHASECAM_MOVERIGHT)) { horizontalRotation += value * rotationSpeed; rotateCamera(); } else if (name.equals(CameraInput.CHASECAM_UP)) { verticalRotation += value * rotationSpeed; rotateCamera(); } else if (name.equals(CameraInput.CHASECAM_DOWN)) { verticalRotation -= value * rotationSpeed; rotateCamera(); } } if (name.equals(CameraInput.CHASECAM_ZOOMIN)) { zoomCamera(-value * zoomSpeed); } else if (name.equals(CameraInput.CHASECAM_ZOOMOUT)) { zoomCamera(+value * zoomSpeed); } } }
/** * Sets the max zoom distance of the camera (default is 40) * * @param maxDistance */ public void setMaxDistance(float maxDistance) { this.maxDistance = maxDistance; if(initialized){ zoomCamera(distance); } }
/** * Sets the min zoom distance of the camera (default is 1) * * @param minDistance */ public void setMinDistance(float minDistance) { this.minDistance = minDistance; if(initialized){ zoomCamera(distance); } }
public void onAnalog(String name, float value, float tpf) { if (isEnabled()) { if (canRotate) { if (name.equals(CameraInput.CHASECAM_MOVELEFT)) { horizontalRotation -= value * rotationSpeed; rotateCamera(); } else if (name.equals(CameraInput.CHASECAM_MOVERIGHT)) { horizontalRotation += value * rotationSpeed; rotateCamera(); } else if (name.equals(CameraInput.CHASECAM_UP)) { verticalRotation += value * rotationSpeed; rotateCamera(); } else if (name.equals(CameraInput.CHASECAM_DOWN)) { verticalRotation -= value * rotationSpeed; rotateCamera(); } } if (name.equals(CameraInput.CHASECAM_ZOOMIN)) { zoomCamera(-value * zoomSpeed); } else if (name.equals(CameraInput.CHASECAM_ZOOMOUT)) { zoomCamera(+value * zoomSpeed); } } }