Error inside runRenderLoop

I have a box that is a particle emitter, I want it to always follow the x and z axis of the camera. I tried to make code inside the loop, but it says the variable was not defined.

That´s my 2 lines of code:

block_snow.position.x = camera.position.x;
block_snow.position.z = camera.position.z;

This block exists and is working perfectly, it only gives error when I add these lines into runRenderLoop.


Hello, we have no way to help you without a repro. I would love to be able to read your code on your computer with the power of my mind but unfortunately I can’t :slight_smile: