Posted: 13th Nov 2002 10:43
im making a game in whick you control a cannon and you have to shoot badies (spheres) that are attacking you
its in the early stages anyway...
im trying to amke the cannon rotate and i can get it to rotate on the horizontal plane with the camera always behind it
now i need to tilt the cannon up and down
ive tried a few things (pivot up/down) but it doesnt seem to work
remarked out the up and down key loops to see how the rst of the code works
thanks for any help
slan
jomo
`MAKE BARREL (SCALE,ROTATE)
make object cube 1,10
scale object 1,100,100,1000
position object 1,0,0,50
color object 1,RGB(168,168,168)
`MAKE MATRIX
make matrix 1,100,100,10,10
position matrix 1 ,0,0,0
sync on
sync rate 30
`CONSTANTS
cameraangle# = -90
theta_angle# = 0
phi_angle# = 0
theta# = 90
phi# = 0
speed# = 1
position camera 0,200,-200
do
set cursor 0,0
if downkey() = 1
phi# = phi# + 1
if phi# > 45 then phi# = 45
pitch object up 1,phi#
endif
if upkey() = 1
phi# = phi# - 1
if phi#