Box2 helper Missing?

there’s planeHelper and box3Helper but there’s no box2helper ?

i’m using box2 to make things stick to a user controlled 2d plane , is there any way to directly visualise the box2 without using a geometry plane , similar to how Box3Helper works ?

The 2D version of Box3 is actually rarely used so a separate helper class in the core would not be appropriate.

1 Like

is there a version i can import available somewhere?
or

is this logic fine ? : create 4 vectors and pass to Line Object when the box2 is created and update the points in the geometry whenever the box2 values are changed

I would go with an indexed geometry of 4 points, that forms a square 1x1, and scale Line object, that contains the geometry, instead of changing vertices directly.

1 Like

i want to use the “containsPoint”, "containsBox " , “expand By box” functions which are there for box3 and box2.

transformcontroller will be used to move a empty group which will inturn update min and max of the box and save min,max vectors for later use.

For box3 i’ll use box3Helper and for Box2 I’ll use planeHelper or LineObject with 4 points , since i’m already dealing with the worldspace points it shouldn’t be to difficult to update the geometry’s position attributes