Hello again. Im having trouble with this script. Im trying to make it so that the camera is always a little higher than the plane, but, it keeps messing up, and Im confused on how I would get it to work. I have tried alot with positioning the camera but, im stumped
The code I have for it so far is
Rem Setup sync
Sync On
Sync Rate 30
Rem Make Cubes and place randomly
For x = 1 to 5
Make object cube x,100
Position object x,Rnd(2000),0,Rnd(2000)
Next x
Rem Make sphere
Load Object "C:\Textures\3d\Aircraft\AngelWing.x",10
Scale Object 10,500,500,500
Fix Object Pivot 10
Rem Main loop
Do
Rem Prints on screen the pitch
Print "Pitch",oPitch#
Rem Store Object angle Y in aY#
aY# = Object angle Y(10)
Rem Control input for camera
If Upkey()=1 then Inc oPitch#,3
Xrotate Object 10,oPitch#
If UPkey()= Then Move Object 10,5
If Leftkey()=1 then Yrotate object 10,Wrapvalue(aY#-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(aY#+5)
If Downkey()=1 Then Dec oPitch#,3
Xrotate Object 10,oPitch#
If DownKey()= Then Move Object 10,5
Rem get player object position and store in X# and Z#
X# = Object position x(10)
Z# = Object position z(10)
Y# = Object position y(10)
Rem Get the variable for the new Y cordinate
NewY# = Y# + oPitch#
Rem Now position the object
Position Object 10,X#,NewY#,Z#
Rem get new camera position and store in cZ# and cX#
cZ# = Newzvalue(Z#,aY#-180,100)
cX# = Newxvalue(X#,aY#-180,100)
Rem position camera
Position Camera cX#,100,cZ#
Rem point the camera at the player object
Point camera X#,50,Z#
Rem Refresh Screen
Sync
Loop
If you know how to fix this, plz send me a message back
ChronicFear
Your suffering cause of me its divine
-Korn-