When touch is pressed, move an actor to a certain location/coordinate
mrchris317
Member Posts: 78
Can someone explain/link me to a tutorial to do, when touch is pressed, move an actor to a certain location/coordinate on the screen. Thank you.
Chris
Chris
Best Answer
-
RThurman Posts: 2,881@mrchirs317 -- careful about rejecting perfectly good answers. That is considered very impolite. You should accept the answers given to you, and then ask for clarification.
You will want to replace the "??" with the mouse x and y coordinates. Do you know how to put them into Change Attribute or Interpolate behaviors?
Answers
@mrchris317 Hi, if you want to move the actor immediately to the new location:
When touch is pressed
Change Attribute self.Position.X to ??
Change Attribute self.Position.Y to ??
Or to move it over time, use either Interpolate behaviour or Move To behaviour; here's the Interpolate method, Move To is similar:
When touch is pressed
Interpolate Attribute self.Position.X to ??
Duration: ?
Interpolate Attribute self.Position.Y to ??
Duration: ?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Chris
Chris
If you could let me know, Id appreciate it. Once again sorry to all Ive offended and thanks for the clarification.
Maybe this video from @tshirtbooth will help: