You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to plot a model from cesium so it maintains its coordinates system?
for example, bringing in another map layer under my model? or another layer of photogrammetry that maintains the world positioning?
The text was updated successfully, but these errors were encountered:
Hi Eytan,
The loader was initially designed to be independent of geo coordinates so unfortunately there isn't currently an intuitive way to do this. It is, however, in the Roadmap and would appreciate a PR on the matter. Since the backend is loaders.gl, everything should be supported. For example adding a resetGeoTransformation: true/false option would be great. In the mean time, you could try this workaround which seems to work for me with Cesium tilesets:
// The loaders.gl matrix type
import { Matrix4 as MathGLMatrix4 } from '@math.gl/core';
// The result from await Loader3DTiles.load()
const {model, runtime} = result;
// Get a reference to the loaders.gl tileset
const tileset = runtime.getTileset();
// Set the model and camera position to the cartesian center
model.position.set(...tileset.cartesianCenter);
camera.position.set(...tileset.cartesianCenter);
camera.translateY(1000);
// If using orbit controls
controls.target.set(...tileset.cartesianCenter);
controls.update();
// Reset the loaders.gl model matrix, otherwise it is set by the loader to inverse the geo-transformation.
tileset.modelMatrix = new MathGLMatrix4();
Is there a way to plot a model from cesium so it maintains its coordinates system?
for example, bringing in another map layer under my model? or another layer of photogrammetry that maintains the world positioning?
The text was updated successfully, but these errors were encountered: