hi there db programmers, im a bit of a newbie and wondered if anyone could tell me how to make the camera move to look like it has jumped, eg if spacekey()=1 then .....
i would be grateful for any help, i have posted my code, so you can see the commands.
thanx
`standard initialisation
autocam off
sync on
sync rate 60
hide mouse
sync
load image "creep02.bmp",1
backdrop on
color backdrop rgb(255,255,25)
make object box 100,10,50,10
color object 100,rgb(50,50,50)
scale object 100,50,50,200
xrotate object 100,90:fix object pivot 100
position object 100,camera position x()+0,camera position y()-20,camera position z()+30
yrotate object 100,wrapvalue(camera angle y())
lock object on 100
`make the bullet
make object sphere 2,5
color object 2,rgb(145,145,145)
hide object 2
height=100
gosub make_world
do
gosub controls
oldx#=x#
oldz#=z#
gosub camera
gosub weapons
y#=get ground height(1,x#,z#)
position camera x#,y#+height,z#
gosub crosshair
sync
loop
camera:
camx#=camera position x()
camy#=camera position y()-20
camz#=camera position z()
return
weapons:
if mouseclick()=1 and fired=0
print "fired"
position object 2, camx#,camy#,camz#
Set object to camera orientation 2
fired=25
Show object 2
endif
If fired > 0
Dec fired
Move object 2,20
If fired = 0 then Hide object 2
Endif
return
crosshair:
ink rgb(255,0,0),0
line 320,230,320,250
line 310,240,330,240
circle 320,240,7
set cursor 1,1
print screen fps()
return
controls:
`mouselook commands
dx#=dx#+mousemovey()/4
cy#=wrapvalue(cy#+mousemovex()/4)
if dx#>90 then dx#=90
if dx#