I came up with this recently
SYNC ON : SYNC RATE 60 : HIDE MOUSE
SET DISPLAY MODE 1024,768,32 : SET AMBIENT LIGHT 30 : COLOR AMBIENT LIGHT RGB(255,255,255)
SET TEXT SIZE 28 : SET TEXT FONT "Impact"
SYNC : CENTER TEXT 512,350,"Loading..." : SYNC
BRICK=1 : BRIKX=0 : BRIKZ=0
MAKE OBJECT CUBE BRICK,10
POSITION OBJECT BRICK,BRIKX,0,BRIKZ
COLOR OBJECT BRICK,RGB(0,255,0)
SCALE OBJECT BRICK,1000,101,1000
SET OBJECT COLLISION ON BRICK
PLR=2
MAKE OBJECT CUBE PLR,10
POSITION OBJECT PLR,0,0,0
COLOR OBJECT PLR,RGB(0,0,255)
SET OBJECT COLLISION ON PLR
PLRX#=0.0 : PLRZ#=-70.0 : PLRA=1
XLOCKSTATE=0 : ZLOCKSTATE=0
POSITION CAMERA 100,200,-100 : POINT CAMERA 0,0,0
DO
IF UPKEY()=1
IF XLOCKSTATE=0 THEN PLRX#=NEWXVALUE(PLRX#,PLRA,2)
IF ZLOCKSTATE=0 THEN PLRZ#=NEWZVALUE(PLRZ#,PLRA,2)
ENDIF
IF LEFTKEY()=1 THEN DEC PLRA,2
IF RIGHTKEY()=1 THEN INC PLRA,2
PLRA=WRAPVALUE(PLRA)
IF OBJECT COLLISION(PLR,BRICK)
IF ABS(BRIKZ-PLRZ#)<(OBJECT SIZE Z(BRICK)/2)
IF PLRX#<BRIKX
IF PLRA>=1 AND PLRA<=180
XLOCKSTATE=1
ELSE
XLOCKSTATE=0
ENDIF
ENDIF
IF PLRX#>BRIKX
IF PLRA>=180
XLOCKSTATE=1
ELSE
XLOCKSTATE=0
ENDIF
ENDIF
ENDIF
IF ABS(BRIKX-PLRX#)<(OBJECT SIZE X(BRICK)/2)
IF PLRZ#>BRIKZ
IF PLRA>=90 AND PLRA<=270
ZLOCKSTATE=1
ELSE
ZLOCKSTATE=0
ENDIF
ENDIF
IF PLRZ#<BRIKZ
IF PLRA>=270 OR PLRA<=90
ZLOCKSTATE=1
ELSE
ZLOCKSTATE=0
ENDIF
ENDIF
ENDIF
ELSE
XLOCKSTATE=0
ZLOCKSTATE=0
ENDIF
POSITION OBJECT PLR,PLRX#,0,PLRZ# : YROTATE OBJECT PLR,PLRA
INK RGB(255,0,0),0
TEXT 15,15,"ANGLE: "+STR$(PLRA)
SYNC
LOOP
See what you guys can do with it