sync on sync rate 30 `Place somewhere at the start Global DH# : DH# = 15 make object cube 1, 10 do if upkey() move camera 1 endif if downkey() move camera -1 endif
rem Standard Setup Code sync on : sync rate 60 set text font "arial" : set text size 12 : set text transparent box1width = 50 box1height = 50 box2x = 220 box2y = 220 box2width = 300
function Distance3D(x1,y1,z1,x2,y2,z2) result#=sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2) endfunction result#
function continueValue(valueA as float, valueB as float) valueC as float if valueB > valueA valueC = valueB + (valueB - valueA) else valueC = valueB - (valueA - valueB) endif
function rotateObjectToPoint(obj, turnSpeed, x, y, z) //store old rotate oldXa as float oldYa as float oldZa as float diff as float oldXa = wrapvalue(object angle x(obj))