--[[
This is the way to rotate an object
that Neo has suggested:
1. Force the object to zero degrees
2. Rotate by required angle
--]]
if track.state == 0 then
$("Arrow2").transformation.rotation = { x = 0 , y = 0 , z = 0 , w = 1 }
$("Arrow2").transformation:rotateZ(math.rad(-120))
end
if track.state == 1 then
$("Arrow2").transformation.rotation = { x = 0 , y = 0 , z = 0 , w = 1 }
$("Arrow2").transformation:rotateZ(math.rad(-60))
end