Camera Follow min, max question

floydianspiralfloydianspiral Member, PRO Posts: 308
edited November -1 in Working with GS (Mac)
So I have a dude who I want to control the camera if he goes off the initial screen but have the ability to do the swipe function of tshirtbooths menu (to peak ahead). I two levels where each works separately but how can I combine them?

I think...that I should have a boolean so when the dude reachs the edge of the screen he controls the camera, but if hes not touching the edge of the screen the player can swipe and peak ahead, but without pushing the dude out of the screen. Haven't gotten it to work. Suggestions?

Comments

  • floydianspiralfloydianspiral Member, PRO Posts: 308
    I'm working with Tshirtbooths menu template (scroll in all directions with finger swipe) and I made a boolean ControlCam.

    CamActor Controls Camera if ControlCam = false (default)
    this works fine.

    Then in my player I have his attributes TargetX, TargetY, and he moves with OffsetX,Y as well. I combined these so PlayerPositionX = TargetX+OffsetX.

    So if PlayerPositionX > game.Scene.Size.Width+OffsetX > turn ControlCam true
    if controlCam true= Control Camera otherwise ControlCam = false.

    It sort of works but when he hits the edge of the screen the camera goes crazy and I can't swipe anymore. Help!
  • floydianspiralfloydianspiral Member, PRO Posts: 308
    floydianspiral said:
    I'm working with Tshirtbooths menu template (scroll in all directions with finger swipe) and I made a boolean ControlCam.

    CamActor Controls Camera if ControlCam = false (default)
    this works fine.

    Then in my player I have his attributes TargetX, TargetY, and he moves with OffsetX,Y as well. I combined these so PlayerPositionX = TargetX+OffsetX.

    So if PlayerPositionX > game.Scene.Size.Width+OffsetX , turn ControlCam true
    if controlCam true= Control Camera otherwise ControlCam = false.

    It sort of works but when he hits the edge of the screen the camera goes crazy and I can't swipe anymore. Help!

  • floydianspiralfloydianspiral Member, PRO Posts: 308
    sorry for the spam, apparently the edit quote just posts a new comment? ^ if the one to read, however. I continue tweaking to no avail....
Sign In or Register to comment.