Question about the camera

azavegaazavega Member Posts: 362
edited November -1 in Working with GS (Mac)
Hi again...
I need to know if by any chance it a way to get the coordinates of the center of the camera while its moving to constrain those values to an attribute... any help?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, I think I'm correct in saying that the camera origin can't be moved, you can only resize the camera area with the same origin; and so the coordinates of the centre of the camera will always be the same, the centre of the screen, i.e for iPhone, 240/160. Hope this is right! And hope that helps. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    you can get it by unlocking an instance of a prototype.

    The center is camera.originX+240 , camera.originY+160 if it is not zoomed in or out
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    gyroscope said:
    Hi, I think I'm correct in saying that the camera origin can't be moved, you can only resize the camera area with the same origin; and so the coordinates of the centre of the camera will always be the same, the centre of the screen, i.e for iPhone, 240/160. Hope this is right! And hope that helps. :-)

    No it can be moved like anything else, but you can only access it in instances that are unlocked
  • gazjmgazjm Member Posts: 578
    if you constrain x to origin.x +240 and y to origin.y+160 for landscape

    or constrain x to origin.x +160 and y to origin.y+240 for portrait

    I believe that should do it.

    You can change the origin, in my latest game bounty hunter I interpolate the origin position between 0,320,640 and 960 to create a scrolling effect between menu screens.
  • gazjmgazjm Member Posts: 578
    haha, beaten this time!
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    scitunes said:
    No it can be moved like anything else, but you can only access it in instances that are unlocked

    Ah of course, just found it in Scene Attributes; must have forgotten about that. Thanks scitunes.
    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • azavegaazavega Member Posts: 362
    Thank you guys... Your help was pretty good actually... Didnt know you can acces to the camera if you unlock a prototype...
    Thanks again.... you guys rock...
Sign In or Register to comment.