Actor to face touch?
aeroblaster4
Member Posts: 7
I have been trying to get an actor to rotate towards a point touched on a screen, but i cannot get it to rotate more than 180ish degrees. I am using vector to angle in a rotate to angle if touches >= 1. Any help/suggestions/other ways to do it?
Comments
Constrain or change those to attributes to ur touch.
Then on the actor u wanna rotate just insert "rotate to position" behavior and in the x and y fields put in touchx and touchy respectively.
Ooo tochy touchy!
That should work
(Optional. Rule: if touch is outside) Constrain attribute (self.rotation) to VectortoAngle((game.touches.touch1x-self.positionx),(game.touches.touch1y-self.positiony))
Vector to angle = target x(-offset x), target y(-offset y)
"(offset)" optional.