playMaker

Author Topic: 2D Movement over time problem [SOLVED]  (Read 4554 times)

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
2D Movement over time problem [SOLVED]
« 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
« Last Edit: August 12, 2014, 09:16:15 PM by MrMitch »

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: 2D Movement over time problem
« Reply #1 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.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
Re: 2D Movement over time problem
« Reply #2 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?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 2D Movement over time problem
« Reply #3 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

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
Re: 2D Movement over time problem
« Reply #4 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!
« Last Edit: August 12, 2014, 09:24:39 PM by MrMitch »