Exponential movement doesn't work




I'm new to exponential movement; I'm no good at doing it. ^^;

Would someone tell me what I did wrong? It seems to be jumping to 406 right away instead of zooming over to it. :p

I meant to ask @GysvANDRegulus on her general topic, but I figured I should make a new topic for this because of people's complaints about there not being enough code topics here. Anyone else's responses are obviously still welcome. :)



Hmm, actually, it seems to be jumping to 250ish... weird. ^^;


That is weird.


@Rawrbear yep this is correct. I'm not 100% sure what you're exactly trying to do, but there is a problem in your code. Currently, you have this:

Set Position X(512) Y(912)

Repeat forever:
-Set Position X(512) Y( (Self Y + (406 - Y Position)) / 2 )

Let's substitute the Self Y position with 912.

-Set Position X(512) Y( (912 + (406 - 912)) / 2 )

Which moves the square to Y 203.

Now the equation is this:

-Set Position X(512) Y( (203 + (406 - 203)) / 2 )

Which also equals 203. So now the square can't move anymore.


Hm, interesting.

I followed this post by Corvus to make my box move from the top of the screen down; it all looks correct to me... :thinking:


You put ((self) + (destination - self)) / ease which is different from (self) + ((destination - self) / ease). Basically you want to divide the destination - self by the ease, and add the self y position


Oh, so the way you place the bubbles actually matters? Didn't know that, hehe. Thanks!

EDIT: Yeah, that worked! Thanks a bunch! :D


That looks really cool!


Thanks!! ^o^