Camera Rotation dependent on frame rate

Shanmukh

Member
I am using the fixedupdate for the player. I tested with high and low frame rates. at a high frame rate camera rotation is slow, and at a low frame rate camera rotation is very high. but in the update loop for the player, any frame rate camera rotation is constant. the issue with fixedupdate.
 
Wait, I just read what you said, again. You should not have the camera in fixedupdate. Fixedupdate is primarily for physics like collisions and applying forces. Camera and FPS are virtually the same thing. Camera should always be in Update()

What are you trying to do? Why did you want to do this?
 
Last edited:
From the controller side of things it moves things correctly in a FixedUpdate at different framerates. If the input is giving inconsistent results then I would talk to the input developer. You can do a test by placing the controller in FixedUpdate and forcing the yaw rotation to a fixed value within the Camera Controller. If you then output the camera angle you'll see that it is consistent across framerates. Immediately before that the input is retrieved so if it's not rotating consistently it relates to the input.
 
if i change the fixed update to update, then the camera rotation issue is fixed. but there are some physics issues on frame rate. player movement in non-rootmotion position is dependent on frame rate. I activate the frame rate independent force. player jumping and falling is slow in low frame rates.
if I deactivate use root motion position, then player movement speed is dependent on frame rate in the update mode.
 
The Framerate Independent Force is only applied to external forces. The initial jump force will be normalized across frames but things like gravity are not. If you are using the Update mode it makes sense to set the Application.targetFrameRate.
 
I am not aware of any issues with the Framerate Independent Force. Control Freak uses the Unity Input Manager as a backend and from what I heard @Andrew got it working by using Rewired for the mouse look ignoring Control Freak's implementation.
 
I am not aware of any issues with the Framerate Independent Force. Control Freak uses the Unity Input Manager as a backend and from what I heard @Andrew got it working by using Rewired for the mouse look ignoring Control Freak's implementation.
even i check in rewired integration demo scene but issue still there
 
I believe Andrew had to get it working by changing Rewired's update rate to both Fixed Update and Update, though I only use Update in my demo scene and it works correctly.
 
Rewired has an option on where you can change the update rate. This is in the Rewired settings. When Andrew said that he switched these settings it worked in fixed update. On my test scene it works by keeping the Rewired settings to the default as well.
 
You'd have to check with the CF developer for that. As far as I can tell, this is an issue with how Unity's input system polls input. I believe the reason Rewired worked for me is because Rewired bypasses Unity's input system completely, using platform-specific input capture. And yes, I set Rewired's input update to both Update _and_ FixedUpdate.

But our project is on a much older version of UFPS, so there may be some discrepancies.
 
Top