Forum rules - please read before posting.

UCC3 integration needs an update and perhaps a camera following fix

edited April 2023 in Engine development

Hello, UCC3 is currently at 3.0.9 and saw its Interact ability slightly changed in 7 or 8 I think, an Interact parameter is now necessary in addition to the GameObject one. Because of that when importing the integration package two errors are thrown about that.
But even after solving this issue by adding the Interact parameter, we can't even play the demo scene because of two initilization issues, here are the stacks if it helps :

[Exception] ArgumentNullException: Value cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry() at <5d4cbfbeb62e454f98e19b231866113e>:0

System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue() at <5d4cbfbeb62e454f98e19b231866113e>:0

EventHandler.GetActionList() at :0

EventHandler.UnregisterEventT1,T2 at :0

Adventure.AttachCharacter() at /Opsive/UltimateCharacterController/Scripts/ThirdPersonController/Camera/ViewTypes/Adventure.cs:38

CameraController.InitializeCharacter() at /Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:429

CameraController.Start() at /Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:359

[Error] Error: There is no look source attached to the character Atlas_AC. Ensure the character has a look source attached. For player characters the look source is the Camera Controller, and AI agents use the Local Look Source.
Adventure.GetDeltaYawRotation() at /Opsive/UltimateCharacterController/Scripts/ThirdPersonController/Character/MovementTypes/Adventure.cs:77

UltimateCharacterLocomotionHandler.GetRotationInput() at /Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:67

SimulationManager/CharacterComponents.Move() at /Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:59

SimulationManager.MoveCharacters() at /Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:278

SimulationManager.FixedUpdate() at /Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:241

I got this kind of error in my main project before, and assigning the character into the Camera Controller's Character slot solves the issue, but not here.

Now here is the issue I wanted to test in the demo scene :

I don't know why, but I'm getting some weird jitter when using side scrolling on a game camera with a ucc character as a target. I tried with the Tin pot character in a simple scene and got correct results.
The camera setup I have on my current project is simple, the character does have a third person combat ucc camera attached which affects its controls, but its Camera component is disabled and AC's main camera follows any designated Game Camera. This allows for the use of Resident Evil-like tank controls but gives me this weird issue that doesn't appear in the scene view nor with UCC's camera.
Could you please first fix the integration so that we can access the demo scene directly and see if you get this side scrolling issue with a ucc character ? Thanks in advance !


  • The UCC integration was recently updated - when did you last download it?

    The workflow has changed slightly to accommodate the LookSource issue - you need to keep the UCC Player in the scene file, instead of having them be spawned in via the Settings Manager.

  • edited April 2023

    Really sorry, I had not even downloaded the latest integration -_-'

    It does solve the Interact errors, however the two errors I pasted here are still present. The strange thing is that you already dragged the character into the Camera Controller. Are you able to play this demo scene directly when importing the integration ?

    And did you try the side scrolling cam with a ucc character ? Am I the only one with this issue ?

    Edit : I can actually play the demo scene in my current project, but can't move the camera. I'm using the AC-UCC managers. The only difference between the two projects is an odd one, for some reason the next UCC version is displayed in the main manager in the test one :

    Not even sure that's related. Could you please try making a test project with only UCC, AC and the integration and confirm whether you can directly play the demo scene with no issue ? Thanks in advance !

  • F*** ! I'm sorry, I totally forgot that I had imported a test package for ucc into this project which may have caused the error. I created a new totally fresh project and the demo scene could be started drectly with no error. However, the third person adventure camera cannot be moved around.

  • edited April 2023

    Alright, so for the side scrolling jitter I went for the simplest solution : I commented out this bit of code at the end of StateHandler._Update and pasted it at the end of FixedUpdate :

            if (!cameraIsOff)
                foreach (_Camera _camera in cameras)

    Since UCC's movement updating seems to involve physics I figured FixedUpdate would magically resolve the issue - and it did ! Although I doubt it's the best solution, it'll do the trick for now but if anybody has a better one please let me know !

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.