Skip to content

Commit

Permalink
Merge pull request #1579 from Kurtil/fix/markerPosition
Browse files Browse the repository at this point in the history
[FIX] marker occlusion
  • Loading branch information
xeolabs committed Jul 17, 2024
2 parents 08fe285 + ad86022 commit 19529a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/viewer/scene/webgl/occlusion/OcclusionLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class OcclusionLayer {
for (let i = 0; i < this.numMarkers; i++) {
if (this.markerList[i]) {
const marker = this.markerList[i];
const worldPos = marker.worldPos;
const worldPos = marker.rtcPos;
this.positions[j++] = worldPos[0];
this.positions[j++] = worldPos[1];
this.positions[j++] = worldPos[2];
Expand Down
5 changes: 1 addition & 4 deletions src/viewer/scene/webgl/occlusion/OcclusionTester.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,7 @@ class OcclusionTester {
continue;
}

// The `origin` has been changed from `occlusionLayer.origin` to `[ 0, 0, 0 ]`
// because OcclusionLayer markers' transformation is being applied through the
// OcclusionLayer::positions array. See XEOK-33
const origin = [ 0, 0, 0 ];
const origin = occlusionLayer.origin;

gl.uniformMatrix4fv(this._uViewMatrix, false, createRTCViewMat(camera.viewMatrix, origin));

Expand Down

0 comments on commit 19529a6

Please sign in to comment.