Forum rules - please read before posting.

UCC Character rotation issue on cutscene start

Hello, when using the AC-UCC3 integration, the player character often rotates towards an unwanted direction when a cutscene pausing gameplay starts. Here's a video showing the issue : https://youtu.be/L6c67p5N6d0?si=ozuJhj6MHBYNXFbs

I used a Resident Evil-like setup similar to my own game and left Control Camera During Cutscenes set to false, but you can also see the issue to a lesser extent when using the Adventure movement and view types and when setting that bool to true. Hope you can help me with this, it's quite an annoying issue in my game. Thanks.

Comments

  • Recreated, thanks for the details - I will look into this.

  • I've updated the package with a potential fix.

  • Hi, thank you for looking into this, but I downloaded the package from the AC website again and the issue is still there, here's a quick video : https://youtu.be/vJelJwBhJkw?si=_vRYqoNHxligxxBn

    Hope you can take another look, thanks. And let me know if I need to send you more info or some repro package.

  • edited September 2024

    What are your AC/UCC versions, and does your copy of the integration's AC_UCC_Character script include the following line?

    acPlayer.SetLookDirection (ultimateCharacterLocomotion.transform.forward, true);
    
  • I'm using UCC 3.1.2r1, AC 1.81.6, and Unity 2022.3.41f1. I searched that line with ctrl+f in Visual Studio but did not find it. I made sure to wait a few hours before redownloading the package from the AC website, so may I ask if you're sure that you uploaded the correct package ?

  • I did - I got that line from a fresh download of the package.

    Copy/paste it into the top of the Update function, under the block that checks if you're in gameplay.

  • edited September 2024

    Hey, I had to redownload the integration from Edge instead of Firefox which I'm usually using, I believe this isn't the first time I'm having this issue :0

    Anyway, I gave it another try after getting the updated package, and while the issue doesn't happen when the character stays put, it does when the character is moving or rotating when the cutscene begins. Here's a new video showing this :

    Hope you can eventually get to the bottom of this, thanks and good luck.

  • Give it a try now.

  • edited September 2024

    Sorry, but I'm gonna have to ask you to delve back into it again ! The character still gets rotated if he's moving when the cutscene begins, and when setting Control Camera During Cutscenes to false, the vertical rotation value of the camera seems to be reset at the end of the cutscene. There seems to be a few ik resetting issues, one being that even when standing perfectly still, the head can jitter for just one or two frames. Here's another video :

    Hope this helps, thanks.

  • edited September 2024

    I will reach out to Opsive for assistance.

  • Hi, any news on this front ?

  • Thanks for your patience.

    After a fair bit of back and forth with Justin, the source of the issue appears to lie with the UCC camera view type.

    If you get in touch with him, he'll be able to elaborate further and offer assistance.

  • Hi, I'm not so sure of that, allow me to share this new video :

    https://youtu.be/lQkmgrzDU1A?si=PMf3TIcOi_I5bRdj

    And a link to the Opsive forum thread :
    https://opsive.com/forum/index.php?threads/ac-ucc-character-rotation-issue-on-cutscene-start.11152/

    I think Justin misunderstood what I was doing with the Combat type, the UCC Combat camera is constantly behind the character's back, and that's what makes the whole thing so strange to me, it should be quite simple thanks to that.

    You can also see smaller rotation issues with the Adventure type when moving the mouse around, so the issue can't be limited to just the Combat type.

    I'll be waiting for Justin to answer and see if we're on the same page. In any case I hope this is helpful, does this give you any more ideas or leads ?

  • edited October 2024

    I understand the issue, but it's still a case of needing to understand the situation on the UCC side. I will need to await Justin's response.

  • edited November 2024

    Hello, here's one more video showing the horizontal look vector from Player Input not being zero when the cutscene ends :

    https://youtu.be/G0weS8Hazws?si=O1-TrHu8ZU6sdWkL

    I cannot pretend to understand all of the subtleties of UCC's and AC's input handling, but I'm pretty sure that something is wrong here, there's no reason for that number to not be zero when the mouse is no longer being moved. Hope this piece of info is useful and that you and Justin can make sense of it, thanks.

    Edit : It might be worth mentioning that I tried changing GetLookVector's smoothed bool parameter to false, and it did not solve the issue.

  • Good find. I hope Justin can shed further light.

  • After narrowing down the issue to UCC's Player Input's Smoothed Look Vector Mode returning non-zero values when switching back to it from Manual, I got a better understanding of the Smooth Look Buffer and found a simple way to clear it, which solves the issue when using the Adventure view type. A simple bool parameter can be added like this to Player Input :

    [SerializeField] protected bool m_ManualCheck;
    public bool ManualCheck { get { return m_ManualCheck; } set { m_ManualCheck = value; } }

    And then in Fixed Update : (lines above are for reference)

    private void FixedUpdate()
    {
    if (!m_Focus)
    {
    return;
    }
    m_RawLookVector = m_RawLookVectorAccumulation;
    if (m_LookVectorMode == LookVectorMode.Smoothed)
    {
    if (m_ManualCheck)
    {
    m_ManualCheck = false;
    for (int i = 0; i < m_SmoothLookBufferCount; ++i)
    {
    m_SmoothLookBuffer[i] = new Vector2(0, 0);
    }
    }

    ...

    This bool can easily be changed from a custom script or AC_UCC_Character.SetCameraInputState. Unfortunately, this does not fully solve the issue when using the Combat type - while the camera doesn't move, the character still has to catch up with its rotation, and in the AC UCC demo scene, if a cutscene is triggered while moving the character will again rotate in an unexpected direction. Here is a video showing all of that :

    Anyway this is progress, and I hope it is helpful. I will look into the character's rotation and experiment with the Combat view type and with a static one again.

  • Hello, allow me to share two simple fixes for those rotation issues ! First of all, when using a control scheme like the Combat one, we need to use the Tank Controls Direct movement type in the Movement section of the Settings tab. It makes sense when you think about how the Combat movement and view type work, there's a reason why I've been relying on them for actual tank controls in my game ! When using this parameter, the character no longer rotates in an unexpected direction when the cutscene begins while he is moving.

    Next, I expanded this condition at the beginning of OnAbilityActive in the Combat view type script :

    if (!(ability is MoveTowards) && !(ability is PathfindingMovement))

    As AC_Motion inherits from PathfindingMovement, the rest of the void is successfully called and m_RotateWithCharacter is set to true and m_Yaw to 0. This results in the character's base rotation to be only a tiny bit affected when a cutscene begins. The character's upperbody rotation can easily be visibly affected, but for the moment I think it is tolerable, as the main issues were the significant character rotation when starting or ending a cutscene.

    Lastly, here is a video illustrating all that :

    I'll be trying to complete and share a custom tank control scheme for UCC in January, but this progress has already been quite a relief, and I hope these notes can help somebody else in the same niche that I am in, using UCC, AC and tank controls ! In any case, happy new year to anyone reading this :)

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.