3
$\begingroup$

First post and very new to geometry nodes, so I might be way out of my depth here.

What I want to do:

  • Here is two bounding boxes generated in geo nodes from two different objects. I want to constrain the inner box to the domain of the outer one. So when I move the inner box it is essentially stuck inside the outer one using math.

Two bounding boxes

I have a system at the moment that is constraining X (I figured I start with one axis) but it doesn't respect the inner bounding box minimum and maximum values. It stops at the center. Here I show the problem:

Demonstration

Here is the constraining part:

enter image description here

I can post the entire network if anyone wants. It's a system where a curve is displacing a plane to make a sort of backdrop and then raycast it down on a grid with extruded walls so it's snug against the floor.

Let me know if I missed any info. Appreciate the help!

$\endgroup$

1 Answer 1

3
$\begingroup$

You need to take the "half" bbox length of the smaller object, subtract it from the larger objects bbox value going into the max node, likewise add it to the min node value of your lower calculation.

enter image description here

Result:

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Ah, you've beat me to it :) My solution: i.imgur.com/RqSb4N7.png $\endgroup$ Commented Jun 13 at 16:49
  • 1
    $\begingroup$ Oh wow, thanks a bunch for the help guys! This did the trick. $\endgroup$
    – Mordrake
    Commented Jun 13 at 21:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .