Skip to content

Commit

Permalink
Fix #1335 markers: keep rotation when updating marker
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jun 25, 2024
1 parent 3431e4d commit 77f8d67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/markers-plugin/src/markers/Marker3D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class Marker3D extends Marker {
// 100 is magic number that gives a coherent size at default zoom level
mesh.scale.set(this.config.size.width / 100, this.config.size.height / 100, 1);
mesh.position.set(mesh.scale.x * (0.5 - this.state.anchor.x), mesh.scale.y * (this.state.anchor.y - 0.5), 0);
mesh.rotation.set(0, 0, 0);
this.viewer.dataHelper.sphericalCoordsToVector3(this.state.position, group.position);

group.lookAt(0, group.position.y, 0);
Expand Down

0 comments on commit 77f8d67

Please sign in to comment.