Add collision_box to tapestries (#14)
Note that long & very long tapestry also have a max collision height of 1.5 (Minetest limitation)
This commit is contained in:
parent
f5e3ac1ffd
commit
0d1240f44a
12
init.lua
12
init.lua
@ -60,6 +60,15 @@ tapestry.colours = {
|
||||
|
||||
-- Regular-length tapestry
|
||||
|
||||
-- Currently only "fixed" collision boxes are handled in Minetest.
|
||||
-- The facedir resulting from the wallmounted direction is then used
|
||||
-- to rotate regular "fixed" boxes, hence the strange "Z/X/Y" order
|
||||
-- Also: maximal height is 1.5. See https://github.com/minetest/minetest/issues/9322
|
||||
local collisionbox_maxh = {
|
||||
type = "fixed",
|
||||
fixed = {0.4375,-0.5,-0.5,0.5,0.5,1.5},
|
||||
}
|
||||
|
||||
minetest.register_node("castle_tapestries:tapestry", {
|
||||
drawtype = "mesh",
|
||||
mesh = "castle_tapestry.obj",
|
||||
@ -71,6 +80,7 @@ minetest.register_node("castle_tapestries:tapestry", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
collision_box = table.copy(collisionbox_maxh),
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = {-0.5,-0.5,0.4375,0.5,1.5,0.5},
|
||||
@ -93,6 +103,7 @@ minetest.register_node("castle_tapestries:tapestry_long", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
collision_box = table.copy(collisionbox_maxh),
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = {-0.5,-0.5,0.4375,0.5,2.5,0.5},
|
||||
@ -115,6 +126,7 @@ minetest.register_node("castle_tapestries:tapestry_very_long", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
collision_box = table.copy(collisionbox_maxh),
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = {-0.5,-0.5,0.4375,0.5,3.5,0.5},
|
||||
|
Loading…
x
Reference in New Issue
Block a user