How can I track the velocity of my finger movement?

How can I track the velocity of my finger movement without constraining an actor to it?

Comments

  • BoomshackBarryBoomshackBarry Member Posts: 712
    I guess you could time it. You could take a start time from game.time when the touch is pressed, take an end time when the touch is released, and then the shorter the interval between the two the quicker your finger was moving. You'd then have to try and work out what velocity that equates too. You might also have to integrate it with further rules to make sure that the touch and release positions were sufficiently different, otherwise there would be nothing to stop people from touching and releasing on the same spot.

    That's not an easy solution by any means though, somebody else might have a better suggestion, but I'd say just constraining an actor and reading it's velocity would be a lot simpler.
Sign In or Register to comment.