Code:
objectID = "43322d"
rotationAmount = 12
function onLoad()
self.createButton({
click_function="rotateCW", function_owner=self, label = "->",
position={-0.4,0.5,0}, rotation={0,0,0}, scale={1,1,1},
width=100, height=100, color=(1,1,1,1),
font_size=70, font_color={0,0,0,1}
})
self.createButton({
click_function="rotateCCW", function_owner=self, label = "<-",
position={0.4,0.5,0}, rotation={0,0,0}, scale={1,1,1},
width=100, height=100, color=(1,1,1,1),
font_size=70, font_color={0,0,0,1}
})
end
function rotateCW()
getObjectFromGUID(objectID).rotate({0,rotationAmount,0})
end
function rotateCCW()
getObjectFromGUID(objectID).rotate({0,0-rotationAmount,0})
end
The