Skip to content

Add a fixed point version of Tween

BimDav requested to merge BimDav/sg-physics-2d:tween into main
  • The only Variant type that can be tweened is Int, representing a SGFixed.

  • The implemented easing functions are linear, sine, quad, cubic, circ, bounce and back. Quint, quart, expo and elastic can be added later.

  • I added directly save_state() and load_state() methods in the c++ code.

  • I removed the Idle mode of processing and added the Manual one.

  • Some minor modifications had to be made to make the state easy to load. Namely, to never have to reload an interpolation, they are discarded only when they have finished for more then the duration of the rollback window, which can be provided by the user. For the same reason, users should not use remove() methods if used with rollback.

Merge request reports