I was hoping to write the following:
function MyComp() {
return (<box name="myBox" showBoundingBox={true} />);
}
But no such prop is available. So instead I need to do the following:
function MyComp() {
const ref = useRef(null);
useEffect(() => {
if (ref.current) {
ref.current.showBoundingBox = true;
}
}, []);
return (<box name="myBox" ref={ref} />);
}
Interestingly showSubMeshesBoundingBox prop is available. But no showBoundingBox.
Using version 3.2.2 of react-babylonjs.