Allow launched bubble to squeeze through spaces
parent
046c9f9f4e
commit
0d4c32864c
2
main.lua
2
main.lua
|
|
@ -271,7 +271,7 @@ function love.update(dt)
|
|||
local diff_x = next_x - slot.x
|
||||
local diff_y = next_y - slot.y
|
||||
local dist = math.sqrt(diff_x * diff_x + diff_y * diff_y)
|
||||
if dist <= game.bubble_diameter then
|
||||
if dist <= game.bubble_diameter - 2 then -- -2 to allow squeezing through
|
||||
local depth = game.bubble_diameter - dist
|
||||
local direction_x = diff_x / dist
|
||||
local direction_y = diff_y / dist
|
||||
|
|
|
|||
Loading…
Reference in New Issue