How to make an actor move away from point of touch?
Dell7730
Member, PRO Posts: 388
I would like an object to move the opposite direction of a touch, like when I touch the left side of any actor, it would move to the right, and it has to move to the exact angle, if I touch it at 25 degrees at the bottom left of the center of the actor, then the actor will move towards 25 degrees to the upper right.
Comments
Move to mouse x, mouse y, speed -100.
Also try Accelerate Towards mouse x, mouse y, speed -100.
Also, if you want to be using a move behaviour or something like that, you can use:
vectorToAngle(self.Position.X-game.Touches.Touch 1.X,self.Position.Y-game.Touches.Touch 1.Y)
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
thanks guys