Hello all, I am back =P I've been gone for a bit.
Anyway I need the left and right arrow keys to move the camera left and right then to save the position so it can rotate it that way, it works expect it won't keep turning, it'l only turn either 3 or -3 and it wont go to like 6 or -6 or anything.
Phy Start
AI start
sync on
sync rate 120
make object cube 1,20
make object box 2,100,1,100
make object cube 3,20
position object 1,0,20,0
position object 2,0,0,0
position object 3,30,1,0
color object 2,RGB(255,0,0)
position camera 0,0,30,-100
x = object position x(1)
y = object position y(1)
z = object position z(1)
phy make box character controller 1,0,20,0,10,10,10,2,2,5
phy make rigid body static box 2
phy make rigid body static box 3
do
x# = object position x (1)
y# = object position y (1)
z# = object position z (1)
newcax#=camera angle x()
cax#=camera angle x()
cax#=cax#+mousemovey()
if cax# > 60 and cax# < 310
cax# = newcax#
ENDIF
xrotate camera wrapvalue(cax#)
text 0,0,Str$(cax#)
text 0,10,Str$(cay#)
position camera 0,x#,y#,z#
rotate object 1,0,cay#,0
if keystate(203)=1
yrotate camera 0,-3
cay#=camera angle y()
yrotate camera 0,cay#
ENDIF
if keystate(205)=1
yrotate camera 0,3
cay#=camera angle y()
yrotate camera 0,cay#
ENDIF
if keystate(200)=1
phy move character controller 1,10.0
ENDIF
if keystate(208)=1
phy move character controller 1,-10.0
ENDIF
phy update
sync
LOOP
Always program as if the person maintaining your program is a psychopath that knows where you live