I have a very simple test scene with a car driving around with one Cinemachine Free Look camera attached but it uses loads of CPU time, 13ms most of the time for the camera, it runs ok if is LateUpdate mode but when it switches to FixedUpdate to CPU use increases a lot. Why does it take so much time, it is making unuasble in our project with that amount of CPU time for one single camera. I have attached the profiler window showing the difference between when Cinemachine is in Fixed Update mode and LateUpdate mode. I really want to make use of Cinemachine but I’ve had one day with it so far and have three deal breaking problems so far.
Ran it with Deep Profile and it just seems very odd, in one frame there is 133 calls to the CinemachineBrain.AfterPhysics, should it not be just one?
Regarding number of times called, perhaps you’re stuck in a spiral of death at 200ms+, causing fixed update to be called multiple times per frame and so on. But that doesn’t account for the generally bad perf…
Thanks for the profile images. There’s no way it should be doing this. We’re looking into it now, stay tuned.
@SpookyCat I’m not getting performance issues at all when running the FreeLookCharacter CinemachineExample scene, which is just a FreeLook following a physics-animated target.
When you set Cinemachine to look at a physics-animated target, the camera will update on every physics frame, to keep in sync with the target and eliminate jitter. If for some reason your frames are taking a long time, and you end up with hundreds of physics frame per rendered frame, then the camera will update a lot. A bad situation. You need to investigate why you are getting so many physics frames per rendered frame.
The scene I have has 35 rigid body objects and that’s it, nothing special, runs at 200fps plus without Cinemachine camera but goes badly wrong with one added.
Can you send me the project?