Here is the minimal code to illustrate my problem:
When I hold the click, the orange cube moves forward among the big green cubes (100 instances) and the projected shadows (trough plugin CSM) shake when I activate my “follow_camera_target” function.
But my fps is still 60fps.
The problem is that this problem appears only on mobile. On a computer, no shaking noticed. I have below the codepen of the code but that will not illustrate the problem… :
Here is a gif of the problem encountered on mobile :
And here is also attached the apk of this piece of code that allows to realize the concern on mobile.
Yes i use csm on this app.
On huge scene, i don’t find a solution to simulate shadow correctly…
But, i don’t believe that’s it’s depending on CSM. The same scene wihtout function “camera_follow_target”. Only orbitcontrols and no problems with shadows shaking :
I think that my function “camera_follow_target” is not perfect, but i don’t see where is the problem.
Thats because the cube is so small to see the the shadows in millimeters. Make the cube 1000 x 1000 x 1000 units, this will make the shadow switching in millimeters invisible.