I’ve been following th LWJGL Tutorial Series to make a 3D-game with a 3rd person camera centered around a player character.
The rotations works fine but problem is that the camera focus is a bit right to the center. (see table: F = focus)
[tr][td]########[/td][/tr][tr][td]######F#[/td][/tr][tr][td]########[/td][/tr]
Image of the offset in action. (Placeholder graphics XD)
The game have a lot of code and posting it all would be suicide so i wonder if anyone could decipher what part of code could be causing the problem.
I post the code for the camera to start with and can post more code if needed.
Also i have the problem of my camera using a different definition of X and Y than the rest of the game, so when my character moves to say (2,4) the camera does that too but moves the opposite direction, still at position (2,4).
SOLVED: Stupidly enough i had missed that i removed the setViewport call. i replaced it and it works fine.
code for Camera.java
http://pastebin.com/SUaNf59X
Thanks for the help!