Rotate to position problem
MarkOnTheIron
Member Posts: 1,447
I have an actor that should rotate facing the direction of the touch on the screen.
I thought that with the Rotate to Position behavior it should have been easy. But I ran into some problems: when i touch the screen for the first time the actor rotate facing the touch and moves toward it, then I touch the screen a second time and the actor moves again toward the touch but this time without rotating, the third times it moves and rotate, the fourth it only moves and so on.
Why is this happening?
Here is the attribute I'm using:
The touch x and y positions are detected from another actor that sits outside the screen
I thought that with the Rotate to Position behavior it should have been easy. But I ran into some problems: when i touch the screen for the first time the actor rotate facing the touch and moves toward it, then I touch the screen a second time and the actor moves again toward the touch but this time without rotating, the third times it moves and rotate, the fourth it only moves and so on.
Why is this happening?
Here is the attribute I'm using:
The touch x and y positions are detected from another actor that sits outside the screen
Comments
That should fix it for you.
As soon as I return at home I will try it