Something crazy with swiping between menus...

architectpianistarchitectpianist Member Posts: 21
edited November -1 in Working with GS (Mac)
Hi,
It's a crazy thing - I have my two actors set up as follows:

Actor Drag:
When mouse button is down,
Constrain attribute "self.position.X" to "game.mouse.position.X"
Constrain attribute "self.motion.linear velocity.X" to "10*("game.mouse.position.X"-"self.position.X")

Actor Cam:
Control camera
Constrain attribute "self.motion.linear velocity.X" to "-'scene.background.drag.motion.linear velocity.X'"

And the funny thing is, the Drag actor moves perfectly when I drag it, but the Cam actor doesn't move at all. If I put an explicit "Accelerate" behavior, it moves, but under these rules it just sits there. How can I fix this?

Comments

  • architectpianistarchitectpianist Member Posts: 21
    I am in fact using that video, to great results on a previous game, and even good results on this same game with vertical scroll. But for some reason, this one won't work! And I did make the camera a tiny + sign in the middle.
    I'm not sure about the constraining linear velocity in the drag actor. If I give it a straightforward velocity change, it responds, but since the actor is constraining to the exact mouse position, doesn't that mean 10*(game.mouse.position.X - self.position.X) would give 0?
Sign In or Register to comment.