I have successfully created a group consisting of 2 meshes in Three.js and a Body containing 2 Shapes in Cannon. Everything looks good individually, but when I attempt to apply physics by copying the Body position to the meshes, the code breaks. Nothing is displayed on the screen, and upon checking the positions, everything seems fine for the Body, but the mesh shows up as undefined.
(Eventually, the goal is to replace the mesh with the model)
Any help would be greatly appreciated. Here is the relevant code:
import './style.css'
import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js'
import * as dat from 'lil-gui'
import * as CANNON from 'cannon-es'
// More code here...