Sorry I am having a maths problem with the x_camera please can you help: I am making a first person space game, I am trying to use the X_camera as the window view and fly around space with planets, meteors and bandits . But I can’t get the camera to move or show in the right way. I am using the list of variables below can you help?
Shipx = ship x position
Shipy = ship y position
Shipz = ship z position
Shipdegxz = axis of xz of ship in space
Shipdegxy = axis of xy of ship in space
motmentum = speed of movement along the axis
The not working code so far:
//setup camera directions
camx= INTEGER(shipx+(motmentum10)+(COS(shipdegxz)))
camz= INTEGER(shipz+(motmentum+10)+(SIN(shipdegxz))+(SIN(shipdegxy)))
camy= INTEGER(shipy+(motmentum+10+(COS(shipdegxy)))
X_CAMERA shipx, shipy, shipz, camx, camy , camz
Next I need to move the ship along the axis:
shipx=INTEGER(shipx+(motmentum+(COS(shipdegxz))))
shipz=INTEGER(shipz+(motmentum+(SIN(shipdegxz)))+(motmentum+(SIN(shipdegxy))))
shipy=INTEGER(shipy+(motmentum+(COS(shipdegxy))))
Thanks, Max
Shipx = ship x position
Shipy = ship y position
Shipz = ship z position
Shipdegxz = axis of xz of ship in space
Shipdegxy = axis of xy of ship in space
motmentum = speed of movement along the axis
The not working code so far:
//setup camera directions
camx= INTEGER(shipx+(motmentum10)+(COS(shipdegxz)))
camz= INTEGER(shipz+(motmentum+10)+(SIN(shipdegxz))+(SIN(shipdegxy)))
camy= INTEGER(shipy+(motmentum+10+(COS(shipdegxy)))
X_CAMERA shipx, shipy, shipz, camx, camy , camz
Next I need to move the ship along the axis:
shipx=INTEGER(shipx+(motmentum+(COS(shipdegxz))))
shipz=INTEGER(shipz+(motmentum+(SIN(shipdegxz)))+(motmentum+(SIN(shipdegxy))))
shipy=INTEGER(shipy+(motmentum+(COS(shipdegxy))))
Thanks, Max