fixed rotation

This commit is contained in:
Chr1Z93 2024-10-31 10:22:43 +01:00
parent b69ec54e3b
commit ab978e1eff

View File

@ -427,12 +427,14 @@ function addMenuOptions(parameters)
end
function sealToken(type, playerColor, hoveredObject)
local chaosBag = chaosBagApi.findChaosBag()
if not chaosBagApi.canTouchChaosTokens() then return end
local chaosBag = chaosBagApi.findChaosBag()
for i, token in ipairs(chaosBag.getObjects()) do
if token.name == type then
return chaosBag.takeObject({
position = hoveredObject.getPosition() + Vector(0, 1, 0),
rotation = hoveredObject.getRotation(),
index = i - 1,
smooth = false,
callback_function = function(obj)