Forum rules - please read before posting.

Root Motion & Advanced Third Person Camera

edited July 2020 in Technical Q&A

I seem to running into an issue with the Advanced 3P Camera when using a character controller and Root Motion animation. If I disable Root Motion on the character's Animator, the problem appears to stop (but then the character locomotion is not how I want it).

The camera jitters quite badly as though it is maybe not updating properly - it is more noticeable when framerate is low (I have yet to find out why framerate often drops, but that's a Unity thing). If I use a simple camera, there is no jittering issue, so it is only this camera.

This is using Direct Control, 3D game,
Unity 2018.3.14
AC 1.71.3

Comments

  • It's not so much an issue with the camera itself, but the relative update calls between that and the Player, which is now moved using the Animator.

    Any difference if you replace the Character Controller with a Rigidbody that uses Interpolation, and are you using the latest version of the camera package?

  • No difference with a Rigidbody I'm afraid, even set to Interpolate.

    I believe this is the latest version of the camera package - it allows you to set both a Height and Horizontal offset.

  • I'll attempt a recreation - can you share your character's full Inspector?

  • Thanks - sent you a PM.

  • Using this camera in a different project & I have finally discovered what the actual issue is - it is not framerate, root motion or Ik/physics causing update issues or any problem with the code of the Advanced Camera itself - it is the Main Camera not keeping up with the camera it is attached to, as though it is somehow a frame behind.

    I replaced the actual camera in the Advanced 3P Cam Game Object with the scene's main camera, and the issue was gone completely.

    To test, I also imported Ootii's Camera Controller and experienced the same jittering/bouncing issue - until I used the Main Camera instead of another camera child object.

    So, you can use the camera without issue, but only if you replace their camera with your scene's Main Camera. This presents another problem though, as if you switch cameras at any time (e.g. to present a close-up), the Main Camera will retain the same parameters as set by that camera e.g. FoV.

  • edited January 2021

    It may be a case of Script Execution Order - as both the MainCamera and the separated Advanced Third Person Camera package update in LateUpdate.

    Try modifying the AdvancedThirdPersonCamera.cs script file's execution order so that it has a negative value - that should force it to update before AC.

  • I set it to -5, and I think this may very well have finally solved it.
    Thank you

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.