Smooth acceleration/deceleration on Circle

Get help using Construct 2

Post » Mon Jun 04, 2012 6:43 pm

I am working on a game where the player controls the movement of an object around a circle. When the object starts moving, I want it to accelerate smoothly to the maximum speed, and when the object stops moving, i want it to decelerate to a stop.

I have the actual movement down fine, but the math for the acceleration/deceleration is escaping me. I know I should be able to use lerp, but my math skills are lacking.

Here is an example capx:
https://dl.dropbox.com/u/38038537/examples/SmoothMove_example.capx

Press left and right arrow to move the ship.

Any help would be appreciated.

Thanks!Wastrel2012-06-04 18:44:27
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Mon Jun 04, 2012 7:37 pm

Last edited by Yann on Sun Sep 14, 2014 9:12 pm, edited 2 times in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jun 04, 2012 7:43 pm

Brilliant! Thanks @Yann!
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, farfetchd83, mjj1990, spcsmrf and 6 guests