Click-Drag Problem (Video)

RUPASRUPAS Member Posts: 823
edited February 2012 in Working with GS (Mac)
Hello my problem is this, I have a box that I want to move your finger around my 960x320 screen, but when I get out of the box 480x320 screen disappears, anyone knows the solution? is a video of the problem, Thanks!

Comments

  • POMPOM Member Posts: 2,599
    edited February 2012
    You need to add "offset" to your constrained red square !

    Open the instance of the red square inside the scene and unlock the "lock"
    Then in your constrain rules make it like this :
    Constrain "self.position.X TO camera.origin.X + Mouse.position.X
    Constrain "self.position.Y TO camera.origin.Y + Mouse.position.Y

    P.S
    It amazing how posting a video of your problem and let us see it, will give you a quick solution, cause sometimes it takes ages to understand problems through people's text , so great job on this!

    Roy.
  • mu-kowAPPSmu-kowAPPS Member Posts: 233
    yeah, so constrain the red square to mouse position x plus camera origin x. then constrain red square y to mouse position y plust camera origin y
  • RUPASRUPAS Member Posts: 823
    Yes Roy! That's right, thank you very much

    PS: I preferred to put a video for it is better for all clear. Thanks Roy
  • CloudsClouds Member Posts: 1,599
    @P-O-M

    "It amazing how posting a video of your problem and let us see it, will give you a quick solution, cause sometimes it takes ages to understand problems through people's text , so great job on this!"

    Absolutely !

    So much better (and easier to offer a solution to) than: "so I got a dog and he's inside the kitchen and he needs to touch the moon to win a coin but when he picks up the stick the coin follows the clock and not the attribute that tells the door when to open???"
Sign In or Register to comment.