Direction in which the ship is pointing:

`// Shipdegxz =Angle in X-Z direction. positive X-Axis=0Â°, positive Z-Axis=90Â°`

// Shipdegxy = Angle if inclination X-Z surface to Y Axis. 0Â°=XZ-Plane, 90Â°=positive Y axis

dx = cos(Shipdegxz)

dy = sin(Shipdegxy)

dz = sin(Shipdegxz)

// make direction the total length "1"

ulen = dx*dx+dy*dy+dz*dz

dx=dx/ulen

dy=dy/ulen

dz=dz/ulen

Now it's easy:

`X_CAMERA shipx,shipy,shipz, shipx+dx,shipy+dy,shipz+dz`

// move

inc shipx, dx*momentum

inc shipy, dy*momentum

inc shipz, dz*momentum