SCED/src/playercards/Tarotcard.ttslua

20 lines
472 B
Plaintext

-- context menu to manually fix rotation
function onLoad()
self.addContextMenuItem("rotate preview", rotatePreview)
self.addContextMenuItem("rotate card+preview", function()
self.setRotationSmooth(self.getRotation() + Vector(0, 180, 0))
rotatePreview()
end)
end
-- rotates the alt_view_angle
function rotatePreview()
local angle = self.alt_view_angle
if angle.y == 0 then
angle.y = 180
else
angle.y = 0
end
self.alt_view_angle = angle
end