Limit speed of drag
alexander144
Member Posts: 93
I have an actor that is able to be dragged left and right however I can keep rushing it really fast left and right and I want it to be limited to a speed I assign. Is it possible to do this and if so, how?
Comments
Rule when
Actor receives event touch is pressed (touch)
(in the behavior for that rule)
--Rule when
--- Actor receives event touch is outside (drag)
----self.Position.X To: touch1.Position.X
and set the speed in Duration:
and you need another Interpolate for the self.Position.Y...replace the Xs above with Ys.
MH
Game.Speed relative to position or something.
I would suggest asking Tshirt Booth about this one.
-----------------------------------------------------
Join the GameSalad Community and have your game noticed for free.
http://www.facebook.com/pages/List-your-TOP-iPhone-game/170419832993723
List your Top iPhone Game on FaceBook!
drag a timer in that rule and set it to every 0 seconds
Then put a move behavior in that timer, put the x postiion mouse position x, and the y postion mouse position y relative to scene
Then in speed put whatever you want the max speed to be
Cheers