by using some math for the xposition and zposition of the camera:
for moving:
`setup (not important)
sync on
make matrix 1,1000,1000,50,50
grav# = 1.0
do
`get camera data
posx# = camera position x()
posy# = camera position y()
posz# = camera position z()
angy# = camera angle y()
`moving forward
if upkey() = 1
`this is the same as:
`posx# = posx# + (cos(angy#) * 3) but faster
posx# = newxvalue(posx#, angy#, 3)
`posz# = posz# + (sin(angy#) * 3) but faster
posz# = newzvalue(posz#, angy#, 3)
endif
`go backward
if downkey() = 1
`this is the same as forward but with a negative value(so backwards)
posx# = newxvalue(posx#, angy#, -3)
posz# = newzvalue(posz#, angy#, -3)
endif
acc# = acc# - grav#
posy# = posy# + acc#
if posy# < get ground height(1,posx#,posz#) + 5
posy# = get ground height(1,posx#,posz#) + 5
acc#=0
endif
if spacekey()=1 and jump=0 and posy# <= get ground height(1,posx#,posz#) + 5
acc#=10
jump=1
endif
if spacekey()=0 and posy# <= get ground height(1,posx#,posz#) + 5 then jump=0
position camera posx#,posy#,posz#
sync
loop
I edited a little of Link102's code to fit in this program.
Immunity and Annihalation makes Immunihalation...