Obi Official Forum

Full Version: Jitter on scene load
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello 

I'm having an issue with Obi softbody where the camera will jitter when trying to follow the softbody player whenever I load into the scene from another using Unity's scene management system. At first, I thought this was just a Cinemachine issue but I found that the ExtrapolationCamera script from the Obstacle Course sample scene also has the same issue after loading the scene with the scene manager.

The Cinemachine and ExtrapolationCamera cameras both work as they should if I play the scene with it already open. I have also been tested and confirmed that this only applies to Obi softbodies and that this issue is present both for my own softbodies and softboies that came with the package such as the player controller from the Obstacle Course sample scene.

It seems that whatever is going on is tied somehow to Unity's scene management system but I'm at a complete loss. Any help would be greatly appreciated.

Thank you.
Hi there,

I tried loading the obstacle course additively at runtime, but could not reproduce any jittering issues. Tried with both the included ExtrapolationCamera as well as Cinemachine, using the following script to load the scene:

Code:
using UnityEngine;
using UnityEngine.SceneManagement;

public class LoadScene : MonoBehaviour
{
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.L))
            SceneManager.LoadScene("ObstacleCourse", LoadSceneMode.Single); // Additive makes no difference
    }
}

Also tried loading the scene straight away in Start(), but it made no difference. At least in theory, it should not be possible for behavior to change depending on how you load a scene.

If you can, please send a project /package that exhibits this issue to support(at)virtualmethodstudio.com so that I can take a closer look.

thanks!
(13-01-2023, 10:08 AM)josemendez Wrote: [ -> ]Hi there,

I tried loading the obstacle course additively at runtime, but could not reproduce any jittering issues. Tried with both the included ExtrapolationCamera as well as Cinemachine, using the following script to load the scene:

Code:
using UnityEngine;
using UnityEngine.SceneManagement;

public class LoadScene : MonoBehaviour
{
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.L))
            SceneManager.LoadScene("ObstacleCourse", LoadSceneMode.Single); // Additive makes no difference
    }
}

Also tried loading the scene straight away in Start(), but it made no difference. At least in theory, it should not be possible for behavior to change depending on how you load a scene.

If you can, please send a project /package that exhibits this issue to support(at)virtualmethodstudio.com so that I can take a closer look.

thanks!

Hello thanks for getting back to me.

I think I've been able to fix the issue, it seems to have been caused by the camera and soft body update cycles not being synced. The solution was as simple as disability interpolation on my softbody object and changing some settings on my cinemachine camera to make sure the update cycles are synced. It is ironic that I originally turned on interpolation for a different jitter issue with the cinemachine camera.

This is the blog post that showed me how to fix it: https://forum.unity.com/threads/rigidbod...r.1005398/

Thanks again for taking the time to help with this issue. This forum has been a massive help as always.