From 42b2a9d32fdb1819e7e23b0610bd30141769bc1c Mon Sep 17 00:00:00 2001 From: Sebastien DUMETZ Date: Wed, 3 Jul 2024 11:11:18 +0200 Subject: [PATCH] fix a bug where if a mesh was the children of another node, the parent's transform wouldn't be taken into account when calculating pick position --- source/client/components/CVOrbitNavigation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/components/CVOrbitNavigation.ts b/source/client/components/CVOrbitNavigation.ts index 3c6a0776..a5810fde 100644 --- a/source/client/components/CVOrbitNavigation.ts +++ b/source/client/components/CVOrbitNavigation.ts @@ -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);