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 Jul 3, 2024
1 parent d0cf871 commit 7ef3a3c
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 @@ -438,7 +438,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 7ef3a3c

Please sign in to comment.