Hi !
I’m confronted to a new issue…
So, i have a group composed by a sphere which is a simple Mesh, and three plane which are InstancedMesh.
All is very well displayed, but i want to rotate each of my InstancedMesh objects, but i don’t know why it doesn’t work…
Here is my function to update my objects (called at each frame) :
function animateParticles(time){
var dummy = new THREE.Object3D()
for (let i = 0; i < particleCount; i++) {
dummy.position.x = Math.cos(time*Math.PI/180 * 100)
dummy.position.y = Math.sin(time*Math.PI/180 * 100)
dummy.position.z = sphereMesh.position.z
dummy.updateMatrix()
spaceDustMesh.setMatrixAt(i, dummy.matrix)
}
}.
time is the elapse time calculated at each frame. The function to update x and y is correct, i tried it directly on my sphere, and it work great.
Can you help me please ?
Thanks