TopDownMovement diagonal movement bug?

Normally going left to right to left accelerates and decelerates the object accordingly.

BUT when going left-right WHILE pressing up at the same time (diagonal movement) the player object just changes direction instantly without decelerating or accelerating at all.

And the same goes with all possible diagonal combinations.

Reproducable with only an object with TopDownMovement behaviour with rotation disabled and camera.Y() locked to object.Y().

Rami was talking about this on the discord, I am able to reproduce this behavior.

Either: there is a bug on how opposite directions work (if moving right and then going left it decel/accelerates again), there is a bug on how angled acceleration works (going from moving left/west to Up and left/northwest is instant, then going up/north is instant, etc), or something isn’t being explained enough to tell how it should work.

Probably need someone who has seen the Top Down behavior code itself to chime in.

The player is not decelerating because he’s still moving (up, in your example), he’s only doing a side change, not a U-turn.
To see the decelerating in a diagonal movement, you should apply the opposite diagonal.

But indeed, it produces a triangle wave pattern instead of a sine wave pattern, and it doesn’t feel natural.

Side to side change should also have deceleration and acceleration, think of a spaceship going forward changing the direction using side thrusters, it’s not an instant change of direction.
Thus your example of sine wave vs triangle is valid.

Sine is what it’s supposed to do and triangle is what it does now.

To be clear, “what it’s supposed to do” is up to the engine devs.

I think there should at least be a toggle option, though.