- Home /
fps goes down when moving the camera
i have this weird issue when i try to move the camera with RigidbodyFirstPersonController script, when i stand still my fps is 120 but when i move the camera or the player it goes to 60-80 fps
and in the profiler the script usage goes high when moving too.
this is my first time asking a question in this forum, sorry for my bad english.
you need to share the code you are using for us to know what is happening
Of course FPS drops on movement, that's because of how everything works. Animation culling, occlusions, lighting calculations, sound calculations, etc. There's a lot going on when you "move" the camera. It's normal for FPS to be greater when stationary. Especially if you're staring at a less complex situation then perhaps is to the left or right of the viewing area.
Answer by Nocktion · Feb 20, 2019 at 03:14 PM
It's pretty normal that your fps drops on camera movement. Unity has to redraw the whole screen, collect objects to draw, do culling, calculate a crowd of things so it's normal. When you stand in place and don't move anything not even the camera the fps is likely to stay still (except a few changes, but that should be about a few fps) .
Which could literally be anything if that's the cause and he'd need to look at the profiler and frame debugger to figure it out. I mean it could literally be anything lol, considering how frames work. The funny part is, frame rate lag is most often caused by processor bogging, and less about graphics calls, considering the graphics card never receives rendering instructions until the CPU packages it all up and send it to the pipeline.
hey could you tell us how to get there i actually have never used that feature of unity in the 3 years ive worked with it >.< yeah i know, sad.
i looked at it a few times but didn't have the patients to play with it yet.
when i used the profiler it said the lag issue was from the RigidbodyFirstPersonController script and Specifically the update function so i'm not sure if it was the camera or the renderer fault but thanks for the reply