PositionCamera
PositionCamera CameraIndex, Xpos, Ypos
 
Parameters:

    CameraIndex = The Index Identifier of the Camera that you wish to read from
    Xpos = The X coordinate where you wish to place this camera
    Ypos = The Y coordinate where you wish to place this camera
Returns: NONE
 

      PositionCamera sets the position of a camera to specific X and Y position in world space.



FACTS:


      * The cameras position relates the top left hand coordinate of the cameras viewport.

      * Camera positions are in World Space not Screen Space.





Mini Tutorial:


      Create a camera, position it and then read back and display this position.

  
  
; CReate a Camera
  CreateCamera 1
  
; Position This Camera to the world space coord of 3000,4000
  PositionCamera 1,3000,4000
  
; Read this cameras X & Y Positions
  Print "Cameras X pos:"+Str$(GetCameraX(1))
  Print "Cameras Y pos:"+Str$(GetCameraY(1))
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  




This example would output.

  
  Cameras X pos:3000.0
  Cameras Y pos:4000.0
  




 
Related Info: :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com