I want to touch the screen my actor will move to the distance that i want

I want to touch the screen my actor will move to the distance that i want and I am not talking about position what i want to whenever you press the screen will move to that distance

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Mysterious ! :)

    Is the question: I want my actor to move to the touch position ?

  • IceboxIcebox Member Posts: 1,485

    mouse button is down , move to mouse position x and mouse position y
    (this will move the actor to the position you want as long as your pressing on the screen but if you release it will stop)

    if you want him to move to the position even while releasing the screen( but will follow the touch even if your moving your finger)

    create a self boolean call it mouseTouch

    1- Create a rule
    if mouse button is down
    change self.mousetouch to true

    2- Create another rule
    if mousetouch is true
    move to mouse position x and mouse position y

    3- Create a third rule
    if self.position x and y is equal to mouse position x and y , then change self.mousetouch to false.

    there might be another better way to do it though, goodluck

Sign In or Register to comment.