Im making a 3rd person platformer videogame on three.js for college. I'm using OrbitControls to rotate the camera around the character. I modified an eventListener on OrbitControls to rotate the camera without the need of pressing any mouse button. It works comparing the diference between the mouse position in two frames and applying the rotation.
The thing is, when I move the mouse all the way to the left for example and there is no more space to move, the camera also stops moving.
I think I could solve this by 'forcing' the position of the mouse to be on the center of the screen every X frames, so it never reaches the screen border, but I can't find any information of this, don't even know if it is possible in three.js. Maybe there is other option to implement this but I can't think of it