Follow mouse

app2perfectapp2perfect Member Posts: 2
edited November -1 in Working with GS (Mac)
I trying get "fluent" follow object to mouse, I found two solutions on this forum (on screen one in disabled - OFF), but present behaviour dont work flueant. I trying add timer and run 1000times / second but object has not kept pace mouse.

Here is screenshot for help http://img847.imageshack.us/img847/5342/zrzutekranu20111025godz.png

Anubody can tell me how get fluent follow object to mouse after mouse is clicked inside object or touch is inside object?

Reagds

Comments

  • outsidethebyteoutsidethebyte Member Posts: 115
    I think I can answer your question.

    Try this:

    Rule:

    When touch is inside:

    Constrain self.Position.X to device.Mouse.Position.X

    Constrain self.Position.Y to device.Mouse.Position.Y

    Personally I would use device.touch.touch1.x or whatever it is, but I think that should work for the mouse as well. I would test it real quick but I'm not at home.

    Good Luck!
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    pilot.awk15 said:
    I think I can answer your question.

    Try this:

    Rule:

    When touch is inside:

    Constrain self.Position.X to device.Mouse.Position.X

    Constrain self.Position.Y to device.Mouse.Position.Y

    Personally I would use device.touch.touch1.x or whatever it is, but I think that should work for the mouse as well. I would test it real quick but I'm not at home.

    Good Luck!

    This.

    Also you can use mouse position just fine its the same as touch on the device. I usually always use
    mouse instead of touch.
Sign In or Register to comment.