[SOLVED] (0,0,0) is the center of the screen?

edited March 2015 in Help request
For some reason, even though the viewport,camera, and object are positioned at (0,0,0), the object shows up in the middle of the screen and its children are nowhere to be found. Does anyone have any clues on what I could be doing wrong?


  • edited March 2015
    0,0,0 defintely isn't the centre of the screen, but the top left coordinate. You'll need to position your camera to roughly centre:
    ScreenWidth   = 800 	
    ScreenHeight  = 600	
    Camera          = Camera
    Position      = (400, 300, -1.0)

    Try that out.
  • edited March 2015
    So I wasn't losing my mind then. Cool.
    How can I dynamically set the position of the camera to the right spot?
  • edited March 2015
    Hmmm that depends. Will your resolution change? If the camera is not to be moved you can just do the math and put the value into the config.

    Otherwise you could get the screen width and height during your init() function and set the camera x position to (screenwidth/2) and camera y to (screenheight/2).
  • edited March 2015
    Thanks, man.
Sign In or Register to comment.