godot icon indicating copy to clipboard operation
godot copied to clipboard

`cubic_interpolate()` and `cubic_slerp()` cause overshoot

Open TokageItLab opened this issue 3 years ago • 1 comments

Godot version

4.0.dev, 3.4

System information

Any

Issue description

#40592 split and resend. Current cubic_interpolate() causes overshoot; we should consider employing modified-akima interpolation.

References of modified-akima:

  • https://slpr.sakura.ne.jp/qp/akima-interpolation/
  • https://jp.mathworks.com/help/matlab/ref/makima.html

Steps to reproduce

https://user-images.githubusercontent.com/61938263/153521705-b5c1c87b-c852-4457-8db5-511b5be78942.mov

Minimal reproduction project

cubic_interpolation_test.zip

TokageItLab avatar Feb 11 '22 00:02 TokageItLab

As a first step, we need to refactor the implementation of cubic_interpolate(). Currently, they are duplicated in Vector2, Vector3 and Animation. It should be implemented as one of the Math functions.

TokageItLab avatar Feb 11 '22 02:02 TokageItLab