PositionCameraY
PositionCameraY CameraIndex, Ypos
 
Parameters:

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

      PositionCameraY sets the camera to a position along the Y axis in world space. The X position is not affected.




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's along the X and Y axis. Displaying it's position each time.


  
  
; Create a Camera
  CreateCamera 1
  
; Position This Cameras X coord to the world space coord of 1000
  PositionCameraX 1,1000
  
; Display this cameras current X & Y Positions
  Print "Cameras X pos:"+Str$(GetCameraX(1))
  Print "Cameras Y pos:"+Str$(GetCameraY(1))
  
; Position This Cameras Y coord to the world space coord of 2222
  PositionCameraY 1,2222
  
; Display this cameras current 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:1000.0
  Cameras Y pos:0.0
  Cameras X pos:1000.0
  Cameras Y pos:2222.0
  




 
Related Info: LimitCamera | LimitCameraBounds | MoveCamera | PositionCamera | PositionCameraX :
 


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