Custom go.animate() for scaling

Hi! I’m working on small game and I needed to animate only x value of scale vector of game object. As I found Defold currently support only uniform scale (no?) so I wrote functions for custom animation.

  • It works only for X value but you can change it
  • It works only with one active animation. If you want more - make table for all animations.
  • It doesn’t have playback mode and easing type
    You can find my code here

Thank you for sharing!

You are correct that we only support uniform scaling using go.animate(). It’s discussed here Go.set() and go.animate() doesn’t accept vectors for scaling and tracked by ticket DEF-1696.

Support for animation of non-uniform scale (vector3) released in Defold 1.2.102

3 Likes