FANDOM



This command will rotate the camera around its X axis.

Syntax
XROTATE CAMERA XAngle
XROTATE CAMERA Camera Number, XAngle
Parameters
Camera Number

Integer
The camera number XAngle Float
The angle value to rotate the camera around on its x axis

Returns

This command does not return a value.

Description

The angle value should be a real number.

Example Code
autocam on

make matrix 1,4000,4000,100,100

set matrix height 1,50,50,500

update matrix 1

while mouseclick()<>1

set cursor 0,0 :print "USE ARROW KEYS TO MOVE / A+Z XRotate / S+X ZRotate"

print "SPACE/RETURN To Toggle Rotation Order"

if upkey()=1 then move camera 0,5.0

if downkey()=1 then move camera 0,-5.0

if leftkey()=1 then y#=y#-1

if rightkey()=1 then y#=y#+1

if inkey$()="a" then x#=x#-1

if inkey$()="z" then x#=x#+1

if inkey$()="s" then z#=z#-1

if inkey$()="x" then z#=z#+1

if spacekey()=1 then set camera rotation zyx 0

if returnkey()=1 then set camera rotation xyz 0

xrotate camera 0,x#:yrotate camera 0,y#:zrotate camera 0,z#

endwhile

while mouseclick()=1 : endwhile

delete matrix 1

autocam off

end