GetCameraX
Xpos = GetCameraX(CameraIndex)
 
Parameters:

    CameraIndex = The Index Identifier of the Camera that you wish to read from
Returns:

    Xpos = The X position of this camera
 

      The GetCameraX() function returns the X position of this camera.



FACTS:


      * Camera positions are in World Space, not Screen Space. So the camera may be looking at a coordinate way beyond the screens size.



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: GetCameraY | MoveCamera | PositionCamera | PositionCameraX | PositionCameraY :
 


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