Replies: 2 comments 1 reply
-
I came up with this approach: an attachable wrapper with a dummy shape, with the size of the box inside. I can then add my inside-parts as children to box_inside() which in turn is a child to my_box(), and use the standard anchor vectors. This works fine, except from one little detail: the orientation of the anchors should be reversed, since all inside anchors points towards the center of the box, not outwards. Any idea how to achieve that?
|
Beta Was this translation helpful? Give feedback.
-
Revised attach() can anchor objects inside, but you'd have to manually adjust for the box thickness. |
Beta Was this translation helpful? Give feedback.
-
I'm making a box enclosure library that uses BOSL2, and would like to have anchors for the inside of the box. So that I can for example attach something relative to bottom inside center, or the bottom+left+front inside corner, etc.
What would be the best approach for this? I could add named anchors for all of them, but since named anchors can't be combined (like BOTTOM+LEFT+FRONT) I would need to add the eight corner anchors as well.
Perhaps writing a custom inside_attach() that interprets anchor vectors but offsets them so they are inside the box?
Or some better way?
Beta Was this translation helpful? Give feedback.
All reactions