Hi guys.
Having an animated sprite, I’m trying to resize it when his y-position is changed.
I’ve included these lines into the “update” function:
...
local p = go.get_position()
if not self.dir.y == 0 then
local s = 128 *( 2 - p.y / 800)
go.set("#sprite", "scale.x", s)
go.set("#sprite", "scale.y", s)
end
...
but did not work.
Any idea ?