Hi there,
I have a ship which rotates around the x- and y-axis and move in the direction of rotation.
My only problem is, that the View doesn’t follow properly! It should follow behind the ship looking at it all the time. I tried it this way:
vpNewPosition.x = shipPosition.x + vpSTARTX; //vpSTARTX = 0.0f
vpNewPosition.y = shipPosition.y + vpSTARTY; //vpSTARTY = 50.0f
vpNewPosition.z = shipPosition.z + vpSTARTZ; //vpSTARTZ = 130.0f
shipRotXY3d.transform(vpNewPosition);
vpTrans3d.lookAt(vpNewPosition, shipPosition, vUp);
vpTrans3d.invert();
vpTrans.setTransform(vpTrans3d);
But this doesn’t work properly for example my view always looks upwards, so it looks like the ship turns around the z-axis, but only the view doesn’t follow!!!
The second step would be to smooth the camera movement and rotation, so that you can see the rotation and movement of the ship!!! Can anyone help me???
Greets,
Juan