Camera to scroll right but not left?

gsmetzergsmetzer Member Posts: 31
edited November -1 in Working with GS (Mac)
Hello,

I have a really wide scene for a side scroller. My camera.origin.X is constrained to my main actor who can go both left and right. However I only want my camera to scroll right and stop scrolling when the actor goes left. How can I do this? Is their a way that the camera.origin.X can only go up and not down?

Thanks for your insights
-Gabriel

Comments

  • RHRH Member Posts: 1,079
    If you are using velocity to move the actor you can do -

    when self.motion.linear.X >or= 0 control camera
    otherwise
    blank
  • gsmetzergsmetzer Member Posts: 31
    Great suggestion,
    I hadn’t thought of using motion.linear.X
    Works perfectly!

    Thanks,
Sign In or Register to comment.