Drop cargo back below the harness, just touching the parachute base

Previous +0.55·height pushed the cargo up into the canopy itself —
user's annotation showed the cargo belongs immediately under the
strings' end, not inside the parachute. With the wrapper fix from
the previous commit, parachuteBottom now correctly points at the
harness end, so cargo center = parachuteBottom - cargoH/2 + 0.06
puts the cargo's top right at the harness with a tiny overlap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MVA Global Fret 2026-05-05 13:50:55 +02:00
parent 71d2f06920
commit cf7f84f354

View File

@ -109,9 +109,12 @@ parachuteLoader.load(
const parachuteHeight = size.y * baseScale;
const parachuteBottom = -parachuteHeight / 2;
/* Boîte cartonnée brune positionnée à la BASE DE LA CANOPÉE (là où
les filins convergent) pas en bas des filins. C'est l'endroit
que l'utilisateur a marqué d'un rectangle rouge sur sa capture. */
/* Boîte cartonnée brune positionnée juste sous le harnais (= sous
le bas du parachute), avec un léger chevauchement pour que les
filins aient l'air de se terminer pile sur le dessus du colis.
Maintenant que la bbox est correctement centrée à l'origine
(grâce au wrapper), parachuteBottom correspond bien au point
d'attache visible du harnais. */
const cargoH = 0.30;
const cargo = new THREE.Mesh(
new THREE.BoxGeometry(0.36, cargoH, 0.36),
@ -119,8 +122,7 @@ parachuteLoader.load(
color: 0xb98859, roughness: 0.85, metalness: 0.05
})
);
/* Hauteur ≈ 55% depuis le bas → juste sous la canopée */
cargo.position.y = parachuteBottom + parachuteHeight * 0.55;
cargo.position.y = parachuteBottom - cargoH / 2 + 0.06;
parcelTemplate = new THREE.Group();
parcelTemplate.add(paraWrapper);