Defold 1.2.123 has been released


#21

Found it!

What happens is that when you do:

go.set_rotation(vmath.quat_rotation_y(-math.pi), id)

then the “euler.y” property is -180 in 1.2.123. Previously this returned 180 (and -180 for +math.pi) which was weird.

Your code for the cards depends on that the sign of this value is wrong. The best solution is probably to normalize angles before you compare, so that you always get a value between 0 and 360 without sign. In card.script, hero.script and itemcard.script, replace:

if go.get(".", "euler.y") < 90 then
  ...

if go.get(".", "euler.y") < -90 then
  ...

with the following:

if go.get(".", "euler.y") % 360 > 270 then
  ...

if go.get(".", "euler.y") % 360 < 90 then
  ...

(Sidenote: I found other, yet unsolved rotation bugs. If anyone gets weird rotation problems, please post about them)


#22

This has been fixed and will arrive in the next version.