Solved
Learn Cognite 3D Model
Learn Cognite 3d model, focus object, fit camera, search assets highlight object etc..
Learn Cognite 3d model, focus object, fit camera, search assets highlight object etc..
To focus at a clicked object in Reveal, you can do
Create a bounding box around intersection point like
const boundingBox = new THREE.Box3();
boundingBox.setFromCenterAndSize(intersection.point, new THREE.Vector3(1, 1, 1)); viewer.fitCameraToBoundingBox(boundingBox, 250);
Note that rather than using bounding box directly from the CDF API, it’s recommended to use https://cognitedata.github.io/reveal-docs/docs/api/classes/cognite_reveal.CogniteCadModel#getboundingboxbynodeid to get bounding box for a given node as this accounts for any transformation active on the model.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.