Playmaker Forum

PlayMaker News => General Discussion => Topic started by: ItzArranT on October 05, 2017, 08:49:07 AM

Title: Speeding up movement between two points
Post by: ItzArranT on October 05, 2017, 08: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?
Title: Re: Speeding up movement between two points
Post by: djaydino on October 05, 2017, 10:07:15 AM
Hi,
Have you tried 'move towards' and adjust the speed with a variable?
Title: Re: Speeding up movement between two points
Post by: ItzArranT on October 06, 2017, 04: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.
Title: Re: Speeding up movement between two points
Post by: djaydino on October 07, 2017, 06:32:35 AM
Hi,
Can you show your setup in a video or with images, i tried it and it seems to work here.

(https://i.imgur.com/7H2XKvd.gif)