playMaker

Author Topic: Speeding up movement between two points  (Read 104 times)

ItzArranT

  • Playmaker Newbie
  • *
  • Posts: 41
    • View Profile
Speeding up movement between two points
« on: October 05, 2017, 05:49:07 AM »
Hi all,

Probably an easy solution to this, but how would I create the following functionality:

1) There is a ball that moves between two fixed points.
2) On mouse down, the ball should speed up.
3) On mouse up, the ball should return to its regular speed.

I've tried using 'itween move to' with empty game objects and a 'float add' etc, but the problem is the ball's speed only updates once it reaches the empty game object.

Any ideas?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2247
    • View Profile
    • jinxtergames
Re: Speeding up movement between two points
« Reply #1 on: October 05, 2017, 07:07:15 AM »
Hi,
Have you tried 'move towards' and adjust the speed with a variable?

ItzArranT

  • Playmaker Newbie
  • *
  • Posts: 41
    • View Profile
Re: Speeding up movement between two points
« Reply #2 on: October 06, 2017, 01:46:50 AM »
Thanks for the reply.

I've tried doing exactly that, but the problem is when I click, the speed is only updated once the ball reaches one of its destinations.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2247
    • View Profile
    • jinxtergames
Re: Speeding up movement between two points
« Reply #3 on: October 07, 2017, 03:32:35 AM »
Hi,
Can you show your setup in a video or with images, i tried it and it seems to work here.