playMaker

Author Topic: Mouse Look Jitter  (Read 6367 times)

acornbringer

  • Junior Playmaker
  • **
  • Posts: 82
    • Acornbringer.com
Mouse Look Jitter
« on: October 31, 2024, 03:58:49 PM »
I followed this nice tutorial on making a first person character controller and noticed that the mouse rotation of the Mouse Look action is jittery. It looks like the rotating axis are jumping between factors of 0.25 instead of full floating values when sensitivity is at its default of 15. Lowering Sensitivity lowers that factor and reduces this effect but naturally slows the camera rotation.

Anyone know how this could be changed to smooth out the result regardless of rotation speed?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Mouse Look Jitter
« Reply #1 on: November 11, 2024, 11:12:11 AM »
Hi,

Could it be that you are following the target using regular frame update? you should use LateUpdate ( after all gameobjects are positionned just before rendering), the jitter is likely because of that.

Bye,

Jean

acornbringer

  • Junior Playmaker
  • **
  • Posts: 82
    • Acornbringer.com
Re: Mouse Look Jitter
« Reply #2 on: November 12, 2024, 12:58:36 PM »
[...]
Could it be that you are following the target using regular frame update? [...]

I read that it could have to do with that but I haven't been able to figure out how to change the update method in the script. Am I on the right track? It's a matter of changing the script? I'm pretty unfamiliar with this subject.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Mouse Look Jitter
« Reply #3 on: November 15, 2024, 08:49:43 AM »
Hi,

uhm, no actually, I rewatched the tutorial, it's not the mouseLook I think, it could be something in your scene that makes the framerate very low? can you debug this? do you have a FPS counter?

Bye,

Jean

acornbringer

  • Junior Playmaker
  • **
  • Posts: 82
    • Acornbringer.com
Re: Mouse Look Jitter
« Reply #4 on: November 15, 2024, 08:55:06 PM »
[...] can you debug this? [...]

Sure thing. I came across this behavior while creating the controller in a fresh scene so I'm pretty confidant there was nothing impacting the frame rate. Just to be sure, I recreated the controller again and added an fps counter in a new project altogether. There were no fluctuations in frame rate and the jittering mouse movement was still present.

Here's a video showing the effect I described to visualize. When I move the mouse slowly, you can see the rotation jump between those quarter values I mentioned in the original post. It's happening on the camera X rotation as well as the character Y rotation. At the same time, the character controller movement appears smooth.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Mouse Look Jitter
« Reply #5 on: November 16, 2024, 03:48:59 AM »
Hi,

 great, can you share that fresh project? I'll have a look, if I can repro, I can find out what's going on, thanks :) ou can pm me for the download link,

Bye,

Jean

acornbringer

  • Junior Playmaker
  • **
  • Posts: 82
    • Acornbringer.com
Re: Mouse Look Jitter
« Reply #6 on: November 16, 2024, 09:39:58 AM »
[...] can you share that fresh project? I'll have a look, if I can repro, I can find out what's going on, thanks :) [...]

Thanks for the help! Here's the project download since it was a bit too big to attach. It's an older build of PlayMaker in an old Unity which may have something to do with it but I couldn't say since both have been tried and true for me for a while now.

Unity Project (Mega Download)