Help with touching and flicking

Dazza006Dazza006 Member Posts: 248
edited July 2012 in Working with GS (PC)
Im making a game where I want to touch a ball and flick it in any direction.
Iv created a rule:

when touch is pressed:

interpolate self.position.x to game.touches.touch1x
interpolate self.position.y to game.touches.touch1y

which works but sometimes the ball will go in the complete wrong direction which i don't understand why.
anyone know the best way to do this?

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    @Dazza006 … try

    Rule: when
    Event: touch is pressed
    -Rule: when (this rule is in the behaviorArea of mainRule … nested)
    -Event: touch is outside:
    --interpolate self.position.x to game.touches.touch1x
    --interpolate self.position.y to game.touches.touch1y

    image MH

Answers

Sign In or Register to comment.