CesiumGeoreference设置Origin原点。在原点附近的实体看起来是正常的,但离原点较远的位置处实体看起来就会倾斜,有什么办法可以解决这样的问题?
Hi @wszty,
CesiumGeoreference sets the Origin origin. The entity near the origin looks normal, but the entity farther away from the origin looks tilted. Is there any way to solve this problem?
This is actually expected behavior in the plugin, because your object has to account for the fact that the Earth is round. When you move the entity in a straight line, it eventually will not align with the Earth’s curvature, and it will seem like the Earth is tilting.
Cesium will handle this automatically for you if you attach a CesiumGlobeAnchor
component to the object that is travelling. Make sure that the Adjust Orientation For Globe While Moving setting is true, so that the object automatically accounts for the globe curvature. You can also attach a CesiumOriginShift
component to the object; this will reposition the georeference origin as the object moves.
Let me know if those solutions help!
我觉得你这个问题解决方法如下:BP_Entity还是需要CesiumGlobeAnchor的,但还有一些工作要做。(1)在更新BP_Entity的位置循环中需要判断当前CesiumGeoreference与要更新的经纬度位置的差异,差异太大比如经度或维度差超过1度,就要重新设置CesiumGeoreference的Origin经纬度。(2)循环中要总是用当前的CesiumGeoreference为参考转成UE坐标系后去更新BP_Entity的位置。