#Strange Camera Lag

1 messages · Page 1 of 1 (latest)

vital whale
#

I don't know where to post this so I post it here.
I have the following problem: if I Rotate my camera FPS/TPS Cinemachine or Whatever, It is jittery. only if i look around (movement is smooth, its not a frame rate issue).
The strange thing is that this only happening in editor if I build the game Its fine and smooth, why is this happening? any idea how i can fix this?

cyan iris
#

Very common problem that usually comes from doing something inappropriuate with your rotation code

#

you'd have to share your code and your setup to get started

vital whale
#

Cinemachine FreelookCamera

#

eg

#

if it would be the code, the build would lag as well

#

but the build works

#

and it happens also only like 90% of the time

#

or play and rotate the camera from the inspector

#

so its funny...

cyan iris
#

Show the code

#

the build would lag as well
Or the build is "lagging" too just less so you don't notice it

#

I'm telling you, what you're describing is a classic symptom of certain common code errors

soft girder
#

Yeah, sharing code, setup and a video demonstrating the issue could be helpful.

vital whale
#
public class RotateCamera : MonoBehaviour
{
    public float rotationSpeed = 50f;
    void Update()
    {
        float angle = 0;
        if (Keyboard.current.aKey.isPressed)
        {
            angle = -rotationSpeed * Time.deltaTime;
        }
        if (Keyboard.current.dKey.isPressed)
        {
            angle = rotationSpeed * Time.deltaTime;
        }
        transform.Rotate(Vector3.up, angle);
    }
}```
#

it was probuilder...

#

It only happens if i have pro builder mesh in view

#

The more Complex it is like if i create a level Graybox or Gym it happens, but if there are no probuilder mesh in view it does not

#

and it is not visible on video.