Skip to content

Commit

Permalink
fix a bug where if a mesh was the children of another node, the paren…
Browse files Browse the repository at this point in the history
…t's transform wouldn't be taken into account when calculating pick position
  • Loading branch information
sdumetz committed Aug 1, 2024
1 parent 2911332 commit 42b2a9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/client/components/CVOrbitNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export default class CVOrbitNavigation extends CObject3D
let localPosition = event.view.pickPosition(event as any, bounds)
.applyMatrix4(invMeshTransform) //Add internal transform
.applyMatrix4(model.object3D.matrix) //Add mesh "pose"
.applyMatrix4(model.transform.object3D.matrix) //Add mesh's "transform" (attached CTransform)
.applyMatrix4(model.transform.object3D.matrixWorld) //Add mesh's "transform" (attached CTransform)

const orbit = new Vector3().fromArray(this.ins.orbit.value).multiplyScalar(DEG2RAD);
const pivot = new Vector3().fromArray(this.ins.pivot.value);
Expand Down

0 comments on commit 42b2a9d

Please sign in to comment.