hello, i cannot figure this problem, when im setting rotation of game object in euler angles and then printing out the value in debug console, value is not bigger than -90/90 degrees.
my problem is that i want to move object based on angle, my code is:
init:
…
go.set(".",“euler.z”,math.random(0,360))
print(go.get(".",“euler.z”))
…
update:
local x = go.get(".", “position.x”) + (math.cos(math.rad(go.get(".",“euler.z”))) * speed * dt)
local y = go.get(".", “position.y”) + (math.sin(math.rad(go.get(".",“euler.z”))) * speed * dt)
go.set(".",“position.x”,x)
go.set(".",“position.y”,y)
object is moving only on the right side of screen