Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Moving rapidly works for when you're drawing the top card of a deck. But I'm not. I'm drawing from the middle of a splay.
This code did the trick. It calls Player.getHoldingObjects and .drop()s all but 1.
function onObjectPickUp(player, obj)
local holding = Player[player].getHoldingObjects()
if #holding == 1 or obj.tag ~= 'Card' then
return
end
local splay = holding[1].getTransformRight():normalized()
table.sort(holding, function(a, b)
return a.getPosition():dot(splay) > b.getPosition():dot(splay)
end)
-- drop all splayward objects
for i, c in ipairs(holding) do
if i > 1 then
c.drop()
local pos = c.getPosition()
pos.y = pos.y - 0.2
c.setPosition(pos)
end
end
end