Playmaker Forum

PlayMaker Help & Tips => Android Help => Topic started by: MrMitch on March 19, 2014, 06:16:37 PM

Title: 2D Movement over time problem [SOLVED]
Post by: MrMitch on March 19, 2014, 06:16:37 PM
Ok so with the setup in the picture i attached i've managed to make an object follow my finger on the X axis but my problem is that it instantly moves to my finger.

Is there any way to still use Set Position but to make it move over time or at a certain speed?

Or if anyone can suggest another way of doing it.

Thanks
Title: Re: 2D Movement over time problem
Post by: sebaslive on March 28, 2014, 02:33:52 PM
Hey mitch how about a move towards? You set the vector3 to only get the x from the mouse point and use that to follow. You would need to take out the finish event in the code so that it stays following and runs every frame.
Title: Re: 2D Movement over time problem
Post by: MrMitch on July 30, 2014, 08:55:41 PM
Hey sorry to bring back a dead thread but i've finally got back to working in this.

I've attempted to try what sebaslive has suggested but the script is just confusing.

Could someone perhaps make the changes for me?
Title: Re: 2D Movement over time problem
Post by: jeanfabre on August 05, 2014, 06:49:41 AM
Hi,

 No need to edit that "MoveTowards" Action, simply set the "Finish Distance" to 0 and it will never fire the finish event nor stop moving towards.

Try this way, and if it doesn't work, let me know.

 Bye,

 Jean
Title: Re: 2D Movement over time problem
Post by: MrMitch on August 12, 2014, 09:15:58 PM
I'm sure i tried that before and it didn't work but its working now :D

Thanks Jean!