Page 1 of 1

Where is the mistake?

PostPosted: Sun Mar 03, 2013 21:16
by BlockMen
Hi everyone,

I'm having a little problem with a selectionbox and after playing around a while i don't find my mistake.

So here's the problem: The selectionbox off the nodebox(top-part of door) should be set to the nodebox below. Otherway round (so from the lower to the upper) it works fine, but this way it always produces an error.

To make it more clear i created a screenshot of the error:
Image

The red boxes are the selectionboxes(redrawn by me). The right one is created right, but it is too tall (y2=0.9). So to fit perfectly it has to be y2=0.5. In the left picture it is created with y2=0.5, but then it produces that strange error and outlines the block nearby (see left pic).

left: {-0.5, -1.5, -0.5, 0.5, 0.5, -0.5+1.5/16}
right {-0.5, -1.5, -0.5, 0.5, 0.9, -0.5+1.5/16}


So does someone see my mistake or is it a bug in minetest?

Thanks for help!

PostPosted: Sun Mar 03, 2013 21:33
by Likwid H-Craft
I don't understand what the problem but I think it since the, door titles.

PostPosted: Sun Mar 03, 2013 21:47
by 4aiman
One question: do you set this nodeboxes with values, or by using variables which were assigned beforehand?

PostPosted: Sun Mar 03, 2013 21:47
by aximx51v
what's your nodebox definitions for the door open/closed?

PostPosted: Sun Mar 03, 2013 21:53
by BlockMen
4aiman wrote:One question: do you set this nodeboxes with values, or by using variables which were assigned beforehand?



with values, so here it is set like this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
selection_box = {
            type = "fixed",
            fixed = {-0.5, -1.5, -0.5, 0.5, 0.5, -0.5+1.5/16}
        },

PostPosted: Sun Mar 03, 2013 21:59
by VanessaE
This also happens to me (and has for quite some time), and not just default doors but with all kinds of similar vertical flat objects such as homedecor doors, pilzadam's signs, etc.

PostPosted: Mon Mar 04, 2013 04:19
by BlockMen
I found a workaround for the moment:
When using a nodebox ({0.4, -0.5, -0.5, 0.5, 0.5, 0.5}) and 2nd identical nodebox above,
following selectionbox is useable, but draws an unwanted line at bottom (y1=-0.3)
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
selection_box = {
        type = "fixed",
        fixed = {{0.5, -0.5, -0.5, 0.5, -0.5, 0.5},{0.4, -0.3, -0.5, 0.5, 1.5, 0.5},{0.4, -0.5, -0.5, 0.4, 1.5, 0.5}}
    },


Thanks for support until now,
and if someone finds/knows a solution to make a working selectionbox like that {0.4, -0.5, -0.5, 0.4, 1.5, 0.5} plz post it here, thx

PostPosted: Mon Mar 04, 2013 06:57
by VanessaE
Image

Since the first post is missing its example image, here is an equivalent using doors from my Home Decor mod, which has the same problem. The red lines are drawn over the in-game black selection box as in the first post to highlight them. The door in the left half is properly selected. Move the pointer a bit and it no longer is, as seen on the right (extrapolated selection box behind the door indicated by the dashed line).

In my case, each door consists of two normal-sized nodes that are 1.0 tall, 1.0 wide and 0.125 thick, and a selection box that is 2.0 tall, 1.0 wide, and 0.125 thick (positioned so that it looks the same whether you point to the top or bottom half).