Something crazy with swiping between menus...
architectpianist
Member Posts: 21
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?
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
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?