moving of objects in 3d game is an important step in games and you should have good control in moving light and cameras .Camera position is on base of your game strategy and your game algorithm.for example in this test game(i'm still beginner) I set camera position with this code.
cam.postRotate(45, 0, 1,1); cam.setTranslation(xpos+40, ypos-50, zpos+60);
and you'll see camera in front of girl and above of her head when she moving near house.
in this video you will see how camera move(xpos,ypos,zpos is girl position in 3d place)
another method for moving is using transformation and transform matrix . a transform matrix is a 4 X 4 matrix and in java code you write it as float array with this code
Transform m=new Transform();
now for moving camera and human in x axis(1 unit) set sx=1 .If you have mesh with name human and camera you need only to this code for moving them.
With setting sy and sz you can moving in y and z axis
.Matrix transform is very good for rotation and scale also. In next post i show how you can moving human with rotate hand and leg and body.This game also need a sample algorithm for moving girl .
You can download game for playing from this link
(sorry for some problem in exit and speed it was my first game)
September 5, 2008