no, no, no, NOW all hail pyogenics i messed up the last time

This commit is contained in:
TrèsAbhi authored and GitHub committed 2025-04-06 16:03:04 -05:00
1 parent 9fac6dd40d
commit 73c8807f14
1 file changed
+2 -21
@@ -166,28 +166,9 @@ export async function extractModel(data: string, path: string) {
break;
case 'TransformComponent': {
const translation = new Vector3();
const rotation = new Quaternion();
const scale = new Vector3();
new Matrix4()
.multiplyMatrices(
new Matrix4().compose(
new Vector3().fromArray(component['tc.worldTranslation']),
new Quaternion().fromArray(component['tc.worldRotation']),
new Vector3().fromArray(component['tc.worldScale']),
),
new Matrix4().compose(
new Vector3().fromArray(),
new Quaternion().fromArray(),
new Vector3().fromArray(component['tc.localScale']),
),
)
.decompose(translation, rotation, scale);
node.setTranslation(component['tc.localTranslation']);
node.setRotation(rotation.toArray() as Vector4Tuple);
node.setScale(scale.toArray());
node.setRotation(component['tc.localRotation']);
node.setScale(component['tc.localScale']);
break;
}