Hi,
May someone tell me why the camera doesn’t intersect with the sphere and change the donut scale ?
It works if I replace camera with donut, but I am interested in the camera.
Thanks
Hi,
May someone tell me why the camera doesn’t intersect with the sphere and change the donut scale ?
It works if I replace camera with donut, but I am interested in the camera.
Thanks
Hello,
ActionManager only works on objects of type Mesh or in the Scene itself: Actions | Babylon.js Documentation (babylonjs.com)
Also there is no ellipsoid
/checkCollisions
-property for FollowCamera
. Maybe this is what you want?
Define your min-max camera size.
Add Observer to onViewMatrixChangedObservable
or donut.onAfterWorldMatrixUpdateObservable
:
BoundingBox
and useintersectsMinMax(minCameraSize.add(camera.position), maxCameraSize.add(camera.position))
Or get BoundingSphere
and call
with min-max BoundingSphere.
Example PG:
Thanks, you inspired me,
I just created a box, parented it to my camera and let BJS do the work
Thanks a lot!