i want to rotate a game object by a delta rotation
my method
go.set_rotation(go.get_rotation("/glider") + vmath.euler_to_quat(0, 0, 0), "/glider")
the error
attempt to perform arithmetic on a userdata value
how am i supposed to accomplish this
i want to rotate a game object by a delta rotation
my method
go.set_rotation(go.get_rotation("/glider") + vmath.euler_to_quat(0, 0, 0), "/glider")
the error
attempt to perform arithmetic on a userdata value
how am i supposed to accomplish this
You should multiply, not add:
local current_rotation = go.get_rotation("/glider")
local rotation = vmath.euler_to_quat(0, 0, 45)
local new_rotation = current_rotation * rotation
go.set_rotation(new_rotation, "/glider")
thank you!
all i had to do was swap the plus for an asterisk