Best way to Drag OR Rotate by touch but never both.
Hey guys, I have an actor in which I drag onto the "game area"(works fine) then if I touch the actor it rotates each tap by 30 degrees(that too works fine) BUT if I want to drag the actor to another position, it will register the touch and rotate the actor again.
I've tried various things with little success, any thoughts to a better way of doing this?
In short:
How do you separate the touch and drag attribute apart from the touch and rotate on the same actor?
I've tried various things with little success, any thoughts to a better way of doing this?
In short:
How do you separate the touch and drag attribute apart from the touch and rotate on the same actor?
Comments
Don't do the rotation until the touch is released. If the actor was moved, don't rotate.
I've done some similar types of functionality, and did either a check to see if it moved anywhere, or if a minimum amount of time had passed since you started the touch.
I have done:
vectorToAngle( self.Position.X - game.Touches.Touch 1.X , self.Position.Y - game.Touches.Touch 1.Y )... This allows me to drag and rotate my actor, but as soon as i touch the actor it jumps 90 degrees and then allows me to drag it. Any help would be awesome. (Sorry for asking on this post, i have tried to start a new post and i got no response)