I rotate go in init. Then i change rotation in update. Looks like rotation in init is ignored. But if i add go.get(".",“euler”), all works as excepted. My project script:scenes/game/player/player.script
function init(self)
...
go.set_rotation(vmath.quat_rotation_x(1.57))
end
function update(self, dt)
...
--COMMENT NEXT LINE. AND IT NOT WORK
--pprint(go.get(".", "euler"))
go.set(".","euler.z", -PLAYER.angle)
end
It’s a bit tricky mixing quaternions and Euler angles in defold. In your case, if I stick to using Euler angles it works as expected, e.g.:
function init(self)
go.set(".", "euler.x", 180)
end
function update(self, dt)
go.set(".","euler.z", 0)
end
We are currently looking into potential performance gains in how we handle Euler angles internally in the engine, hopefully we can straighten out some of the issues at the same time.