diff --git a/src/core/token/TokenManager.ttslua b/src/core/token/TokenManager.ttslua index 42477a2a..7c18cada 100644 --- a/src/core/token/TokenManager.ttslua +++ b/src/core/token/TokenManager.ttslua @@ -165,11 +165,9 @@ do TokenManager.spawnCounterToken = function(card, tokenType, tokenValue, shiftDown) if tokenValue < 1 or tokenValue > 50 then return end - local pos = card.positionToWorld(card.positionToLocal(card.getPosition()) + Vector(0, 0.2, shiftDown)) + local pos = card.positionToWorld(Vector(0, 0.2, shiftDown)) local rot = card.getRotation() - TokenManager.spawnToken(pos, tokenType, rot, function(spawned) - spawned.setState(tokenValue) - end) + TokenManager.spawnToken(pos, tokenType, rot, function(spawned) spawned.setState(tokenValue) end) end -- Spawns a number of tokens. @@ -230,10 +228,16 @@ do local tokenTemplate = tokenTemplates[tokenType] -- Take ONLY the Y-value for rotation, so we don't flip the token coming out of the bag + local rot = Vector(tokenTemplate.Transform.rotX, + 270, + tokenTemplate.Transform.rotZ) + if rotation ~= nil then + rot.y = rotation.y + end return spawnObjectData({ data = tokenTemplate, position = position, - rotation = Vector(tokenTemplate.Transform.rotX, rotation.y or 270, tokenTemplate.Transform.rotZ), + rotation = rot, callback_function = callback }) end