I’ve been learning how to use the jPCT library over at http://www.jpct.net/ and I’ve run into an issue regarding the camera, if anyone is interested in the JDoc location, here’s a link: www.jpct.net/doc/
The reasoning for me posting here, and not on the jPCT forums, is because the forums over there look a little more than abandoned.
Here’s my issue:
Currently the camera automatically snaps to the rotation of my player, however instead I’m trying to allow the player to rotate inside of the camera, without the camera following it’s rotation, only it’s position, here’s the code that I’m using for the camera.
private Camera camera;
public Constructor() {
camera = world.getCamera();
camera.setFOV(3f);
camera.moveCamera(Camera.CAMERA_MOVEOUT, 180);
}
public void tick(float delta) {
camera.setPositionToCenter(this);
camera.align(this);
camera.rotateCameraX((float) Math.toRadians(50));
camera.moveCamera(Camera.CAMERA_MOVEOUT, 150);
camera.moveCamera(Camera.CAMERA_MOVEDOWN, 10);
}
“Constructor” is an subclass of Object3D and when I change it’s rotation the rotation of the camera changes as-well, I’ve better with all of the camera.rotate options and I’ve come up short. Continuing development with the camera snapping like this is possible, and I’ll come back to it later unless someone here has some solutions.