调整模型位置

Cesium源码 · geohrk · 于 4年前 发布 · 8284 次阅读

最近想尝试在cesium上加载自己的3dtiles模型,模型是用github上的开源项目3dtiles从osgb转出来的。 加载成功后发现模型会悬浮在空中,看了很多解决方法,如果要实现自动贴地大概需要知道模型的坐标,以及地面点的坐标来做差得到变换矩阵。 大家似乎都是使用boundingSphere得到的模型的位置,我也试了一下官网的模型确实可以得到。但我自己转出来的就不可以

有大神知道为什么吗 以下是错误详情:

message: "Cannot read property 'updateTransform' of undefined"

stack: "TypeError: Cannot read property 'updateTransform' of undefined↵ at Cesium3DTileset.get (https://cesium.com/downloads/cesiumjs/releases/1.67/Build/Cesium/Cesium.js:23:1872180)↵ at eval (eval at (file:///D:/Smart_out/Generalosgb/Productions/Production_1/sanlie/test.html:47:27), :1:15)↵ at file:///D:/Smart_out/Generalosgb/Productions/Production_1/sanlie/test.html:66:27"

proto: Error

共收到 3 条回复
nebula#12年前 0 个赞

我也遇到了这么问题, 请问楼主解决了吗

admin#22年前 0 个赞

楼主你的Cesium版本比较低。你试试升级一下版本?

yanhaha#32年前 1 个赞

矩阵偏移一下就可以了

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics