diff --git a/src/Layer/PointCloudLayer.js b/src/Layer/PointCloudLayer.js index c84304afcf..71c7adc296 100644 --- a/src/Layer/PointCloudLayer.js +++ b/src/Layer/PointCloudLayer.js @@ -253,7 +253,8 @@ class PointCloudLayer extends GeometryLayer { } elt.notVisibleSince = undefined; - point.copy(context.camera.camera3D.position).sub(this.object3d.position); + point.copy(context.camera.camera3D.position).sub(this.object3d.getWorldPosition(new THREE.Vector3())); + point.applyQuaternion(this.object3d.getWorldQuaternion(new THREE.Quaternion()).invert()); // only load geometry if this elements has points if (elt.numPoints !== 0) {