From 6b882536e64fed82596ba41b1ea9701f6a7e52fd Mon Sep 17 00:00:00 2001 From: Aaron Suen Date: Tue, 21 Nov 2023 11:16:22 -0500 Subject: [PATCH] Simplify collision boxes The collison box of stones is by default the same shape as the nodebox, not the selection box. When a player is walking across the top of a bunch of stones with the more complex collision box based on the node box, it causes some judder due to the player fitting into some small contours and "falling" a pixel or two before climbing back out. Making the collision boxes match the simpler selection boxes prevents this. --- stones.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stones.lua b/stones.lua index c97c1d5..268340a 100644 --- a/stones.lua +++ b/stones.lua @@ -47,6 +47,10 @@ local function reg(name, basename, basedef) type = "fixed", fixed = {-7/16, -8/16, -7/16, 7/16, 2/16, 7/16} }, + collision_box = { + type = "fixed", + fixed = {-7/16, -8/16, -7/16, 7/16, 2/16, 7/16} + }, tiles = { @@ -91,7 +95,10 @@ local function reg(name, basename, basedef) type = "fixed", fixed = {-6/16, -8/16, -6/16, 6/16, 0/16, 6/16} }, - + collision_box = { + type = "fixed", + fixed = {-6/16, -8/16, -6/16, 6/16, 0/16, 6/16} + }, tiles = { basedef.tiles[1]