Currently, there are meshes on the scene, and all of them are not set in any parent-child relationship.
All of them are located at the origin and are being rotated using rotateY()
.
They are also not in a parent-child relationship with the sphere geometry.
I tried to make them into a parent-child relationship, but it did not work.
I want the sphere geometry to orbit around one specific mesh on the scene, like a satellite, following the rotation of that mesh.
I don’t know the specific way to achieve this, so please tell me.
This is called within the [drag]
event of DragControls
:
// Rotate the meshes
for (const mesh of this.meshs) {
if (rotateType === TruckModelRotateType.RIGHT) {
mesh.rotateY(0.01);
} else {
mesh.rotateY(-0.01);
}
}
type or paste code here
type or paste code here