This must be simple, but I just can’t figure it out. I have a fps style environment which the user can use the arrow keys to swing the main camera around to look at the ‘world’. I would like to use the same arrow keys to control the rotation of a mesh object, using the space bar to toggle between both control methods. I have tried a few approaches without success. This latest effort doesn’t work at all…any suggestions?
on=0
;main loop********************************************************************************************
While Not KeyHit(1)
If on=1
lights_movement
c_arm_movement
unlock_table
position_cameras
check_flag
Else
lights_movement
camera_pick
camera_movement
position_cameras
check_flag
End If
UpdateWorld
RenderWorld
Rect x,y-3,1,7
Rect x-3,y,7,1
Flip
Wend
;*****************************************************************************************************
Function check_flag()
If KeyDown(57)
on=1-on
EndIf
End Function
the other functions work perfectly, but introducing another loop layer seems to muck things up completely. any suggestions...please
thanks,Shawnus
on=0
;main loop********************************************************************************************
While Not KeyHit(1)
If on=1
lights_movement
c_arm_movement
unlock_table
position_cameras
check_flag
Else
lights_movement
camera_pick
camera_movement
position_cameras
check_flag
End If
UpdateWorld
RenderWorld
Rect x,y-3,1,7
Rect x-3,y,7,1
Flip
Wend
;*****************************************************************************************************
Function check_flag()
If KeyDown(57)
on=1-on
EndIf
End Function
the other functions work perfectly, but introducing another loop layer seems to muck things up completely. any suggestions...please
thanks,Shawnus