Go.animate accepts vector3|vector4 properties but doesn't animate them (DEF-1311) (SOLVED)


When trying to go.animate a vector 3 or 4 the vector doesn’t change from its original values but it still runs the on_complete-function at the end of the animation.


go.property("tint", vmath.vector4(1, 1, 1, 1))
local on_complete = function()
    print "Done!"
go.animate("#", "tint", go.PLAYBACK_ONCE_FORWARD, vmath.vector4(1,0,0,1), go.EASING_LINEAR, 1, 0, on_complete)

print(self.tint) in update shows only vector4 ( 1, 1, 1, 1 ) during that one second and then prints “Done!”

When trying to animate sub-components of script-properties like “tint.x” the console tells me
’[default:/monster#script_sprite]’ does not have any property called ‘tint.x’

Welcome to the bikiniverse!

Thanks, I’m filing an issue/bug that it should be possible to animate vectors and reference their subcomponents.


It is still not possible to animate vector3, vector4? Right?


No, I’m afraid not. Ticket: DEF-1311


((( I can’t animate vectors.
Have you plans to fix that?


What are you trying to animate? There are workarounds.


Yes, of course! The mysterious “DEF-1311” means there is an issue added to the backlog and in time it will be fixed. We would like to have the issues accessible by anyone, but for technical reasons we can’t do this right now (they are a part of the internal ticketing system at King, and we can’t expose parts of it).


Is there any news?


Want to lift this one up. Many times you want to animate vectors (tints, matrix-math, positions not belonging to gameobjects etc )
What would the workaround be? I guess right now properties x 4 stitching them together to vectors whenever being used.


The next release will add support for animating scale specifically (DEF-1696). I had hoped that it would include animating any script property, but that still remains to be implemented. I’ve added your request to the ticket as well.


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


Bumping this once again.
Many times you want to animate vector properties but just cannot. All material properties are vectors but must be split to 4 animations and 4 properties. Non-uniform scale is for sure a vector3 and it is supported. From the outside it just doesnt seem to be that hard to have included the general vector3/4 property as well?

More of an annoying thing than unsolveable.


Solved in Defold 1.2.123