Hey there! I stumbled on this while trying to figure out BoundsClipper usage for a 3d PokeInteractable... but I think I achieved what you were trying to do while going through some of the previous world-space canvas examples. I use this for a world space canvas that responds to raycast pointing as well as physical controller/hands poking. I'm using Meta XR Core SDK, Meta XR Interaction SDK, and Meta XR Interaction SDK Essentials packages all version 72.0.0. So my apologies if this isn't comprehensive, or exactly what you're looking for, but I hope it helps!
My GameObject and Component structure:
- A GameObject to be the root of my prefab, let's call this root. It has components: PointableCanvas, RayInteractable, PokeInteractable
- A child GameObject of root with world space Canvas component (and other canvas stuff it comes with) and PlaneSurface component (sounds same as your setup), call this Canvas.
- A direct child of the Canvas GameObject, called CanvasSurface with the components: RectTransform, CippedPlaneSurface, BoundsClippper, RectTransformBoundsClipperDriver. Its transform is set to fill it's parent canvas transform.
- A direct child of the Canvas GameObjet called CanvasSelectSurface with the components RectTransform, ClippedPlaneSurface, BoundsClipper, RectTransformBoundsClipperDriver. This object's RectTransform is set to -50 in all directions since I want to be able to move a scrollview a little bit outside of the canvas bounds. I'm pretty sure this object and references to it are optional, but I don't quite remember since I put it together >1year ago.
My Component references (in the format "GameObjectName.ComponentName"):
- root.PointableCanvas field Canvas references Canvas (Canvas)
- root.RayInteractable fields
- PointableElement references root
- Surface references CanvasSurface (Clipped Plane Surface)
- Optionals > SelectSurface references CanvasSelectSurface (Clipped Plane Surface)
- root.PokeInteractable fields
- PointableElement references root (Pointable Canvas)
- SurfacePatch references CanvasSurface (Clipped Plane Surface)
- CanvasSurface.ClippedPlaneSurface fields
- PlaneSurface references Canvas (Plane Surface)
- Clippers has a single element referencing CanvasSurface (Bounds Clipper)
- CanvasSurface.RectTransformBoundsClipperDriver fields
- BoundsClipper references CanvasSurface (Bounds Clipper) (I'm pretty sure this diriver will auto-update the attached BoundsClipper size based on the canvas size)
- CanvasSelectSurface.ClippedPlaneSurface fields:
- PlaneSurface references Canvas (Plane Surface)
- Clippers has a single element referencing CanvasSelectSurface (Bounds Clipper)
- CanvasSelectSurface.RectTransformBoundsClipperDriver fields
- BoundsClipper references CanvasSelectSurface (Bounds Clipper)