Jump to content

FPS Controller mouse look feels jittery. Here's why.


photo

Recommended Posts

Posted

At some point, it looks like a 0.1f coefficient was removed from FirstPersonController.cs which is causing mouse look to feel jittery.

When creating a new project, I always feel like the mouse look doesnt feel quite right.  I tried using a PlayerActor instead and that felt much smoother, but using FirstPersonController feels very jittery in comparison. 

I downloaded and looked at the demo: C# Component Samples.  One of the samples, Character Controller, uses the same FirstPersonController.cs, but doesnt have the same jitter problem. I compared the two versions of the code.  They are nearly identical except where Input.MouseDelta is used:

Old controller script:

float delta = -Input.MouseDeltaPosition.x * mouseSensitivity * 0.1f;

...

float delta = -Input.MouseDeltaPosition.y * mouseSensitivity * 0.1f;

New controller script with jittery mouse look:

float delta = -Input.MouseDeltaPosition.x * mouseSensitivity;

...

float delta = -Input.MouseDeltaPosition.y * mouseSensitivity;

 

When I added the 0.1f coefficient, mouse look feels much smoother again.

Consider making this small change.  It makes the first person controller feel less jittery when looking around.

Posted

webnetweaver

This smooth coefficient is available in default C# FPS controller since 2.19.1 SDK update. If you created project in earlier version and then upgraded it, the FPS controller code will remain unchanged and you will need to modify it for your needs manually.

Thanks!

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...