[TUT] First Person Camera Control

Started by Lloydg, June 16, 2010, 11:01:33

Previous topic - Next topic

Lloydg

Hi, new here but i just wrote this Tutorial using this fantastic Java game library :)

So I thought i should sign up here and share it with y'all.

Should be more to come but this is my first tutorial, so it probs has lots of typos and such.

please let me know what you think of it and any questions and comments are welcome.

and any pointers on writing tutorials would be nice.

Anyway here is the link. http://www.lloydgoodall.com/lwjgl-fpcamera.shtml

Thanks, Lloyd

Evil-Devil



Brett

Awfully similar to the implementation I came across in a decompilation of a game-demo found here http://lwjgl.org/forum/index.php/topic,3111.msg17155.html#msg17155 ... which was created many months before your tutorial. Actually, the code is almost identical except for the refactoring of a few monikers. Care to explain?

Klinenator

Im trying to use this code and when i press W,S,A,D it doesnt move at all. The mouse part works fine

it looks like its getting caught up here

time = Sys.getTime();
dt = (time - lastTime)/1000.0f;
lastTime = time;

dt is always 0 for me and time is always 1.2884565E12

since the distance is calculated as movementspeed*dt its always going to return 0;
and not move at all.