Forum rules - please read before posting.

Integration Third Person Controller

Would it be possible to have an updated tutorial on the integration of UCC2. I have been there for several days and I have come to nothing except error messages. There are several tutorials and I don't understand anything anymore. Should we first create the player in AC or UCC? Should we add a script? If yes which ? In short, a simple tutorial to explain things clearly in order is really essential. I invested 100 euros in UCC because it was indicated in the AC manual that it could be integrated and that does not seem to be the case.




    It's a very basic integration (basically it turns off input while AC is in cutscene/paused status).
    You should first create the UCC character, then add the AC player component and then this script.

  • Which tutorial are you referring to?

    Not wanting to sound pedantic, but the AC Manual refers to the legacy UFPS asset - not UCC. A note on this is made at the top of the "Ultimate FPS integration" chapter.

    The wiki link above is indeed basic, but I have been asking the developer more more assistance with it. Give the script above a try, let us know how you get on with it - and we can try to work through things from there.

  • I will not persevere. You talk about the walking dead on your site and you say that with AC, we can create a game with the same type of gameplay. That's what made me want to buy this asset. I spent a lot of time learning but I realize that it is impossible to create a game of this type with only AC unless you are a developer.
    It's a shame because it would make this asset unique and essential.
    I do not question the qualities of AC but the impossibility of integrating combat phases greatly diminishes its interest.
    I will try to create my game with playmaker and UCC. I do not know if I will get there but I have no other solution at the moment.
    I apologize for my bad english.

  • edited April 13

    @Alcaria If you're referring to "combat" in the form of the tightly-controlled QTEs and scripted-sequences that occur in Telltale's Walking Dead series, then certainly AC should deliver.

    What UCC offers is more freeform, traditional combat - very different to that seen in those games, and not something that AC advertises. But with an integration script to tie it together, this kind of gameplay can be worked in.

    If you can describe exactly the scenario you'd like to create, feel free to share and I will do my best to offer my thoughts on how appropriate AC would be for the job.

  • Okay. I don't want to create an FPS but tell a story. I no longer see this game as an interactive film with many interactions between the characters. AC is ideal for this type of gameplay.
    By cons, in my scenario, my hero will have to face enemies if he wants to achieve his goal. This is where I block. The player will have to use a weapon and decide whether to shoot or not. I can create a shoot animation but the player will not be able to use his mouse to shoot.

  • I can create a shoot animation but the player will not be able to use his mouse to shoot.

    As in, you want to use the mouse - but haven't got this set up?

    One way to achieve this (and this is what I mean by "Walking Dead combat") is to simply attach Hotspots to your enemies - so that clicking them results in the Player attacking them as part of a controlled attack sequence.

    This could be as simple as the Hotspot's "Use" interaction - with an optional additional check to a Global Boolean variable named e.g. "In Combat Sequence" if you wanted to have a different reaction when clicking outside of combat mode. Or you could make it an Inventory interaction, whereby selecting a "gun" inventory item and then clicking the enemy results in the attack sequence.

    Alternatively, you could make this more of a QTE sequence, whereby the player has to press the desired button within a fixed timeframe. A tutorial on this can be found here.

    For a slightly more "open" approach, whereby you run a sequence upon mouse-clicking regardless of where it is on the screen, you can set up an Active Input.

    Active Inputs are a way of running ActionLists when an input is pressed while in a certain game state - e.g. Normal (gameplay), Cutscene, or Paused. See the Manual's "Active Inputs" chapter for details.

    To set this up, define a new input in your Input Manager named e.g. "Shoot", and set the Positive Button to mouse 0 (the left-mouse button). Then, in the Active Inputs Editor window (available from the top toolbar), define a new input that respnds to "Shoot", and assign an ActionList to run when this is triggered.

    This ActionList - to begin with - would just have the Player firing their weapon, since you won't know immediately if they're actually lined up to hit an enemy. To do that, you could possibly do this with a pair of Triggers to act as the gun's line-of-sight - but more robustly you'd likely want a custom script or Action that checks to see if an enemy is standing in front of them - and then run another ActionList if so.

    Let me know which approach sounds good and I can elaborate further - but the more info you can offer in terms of exactly what you want, the more detailed I can do so.

  • The bridge on the wiki got broken after UCC 2.2 update (came up today):
    error CS0103: The name 'EventHandler' does not exist in the current context
    Cool to know that you are trying to improve on it.

  • error CS0103: The name 'EventHandler' does not exist in the current context

    I will look into it.

  • Replace:

    using Opsive.UltimateCharacterController.Events;


    using Opsive.Shared.Events;

    Does that fix the issue?

  • Yes, thank you so much.

  • Following your comments, I am rethinking the whole gameplay. Thank you for your help and advice. I will test the different options that you list and I will get back to you if I get stuck.

  • edited April 16

    Does this script suppose to work with the Third Person Controller as well? Or was it designed strictly for Ultimate Character Controller?
    Because I'm getting errors on the scripts compile:

    • Assets\Opsive\AdventureCreatorControllerHandler.cs(27,12): error CS0029: Cannot implicitly convert type 'AC.Player' to 'Player'

    • Assets\Opsive\AdventureCreatorControllerHandler.cs(76,11): error CS1061: 'Player' does not contain a definition for 'motionControl' and no accessible extension method 'motionControl' accepting a first argument of type 'Player' could be found (are you missing a using directive or an assembly reference?)

    Using the latest AC and Opsives TPS with 2019.3

  • It was intended for UCC, but I've been told the systems are shared.

    Try the wiki again - I've made a couple of tweaks.

  • edited April 16

    Wow, thanks that was really fast!
    And it works perfectly!

  • edited May 22


  • Regarding AC's UCC integration: I am currently looking into providing a tighter integration, with UCC being used for movement the whole time - as opposed to AC taking over motion duties during cutscenes.

    However, UCC is a complex asset so it is taking some time.

  • Yeah, sorry I deleted my comment. I wanted to triple check if it's actually the case.
    And it seems that it is. I'll copy and paste it here just in case anyone has similar issues.
    Glad to know you're improving the integration! Thanks for this!

    I think there's a serious bug in the script preventing Opsive camera to be disabled while one of the AC's cameras are active.
    Even though the Game view is rendered using AC's Camera, hotspot detection is based on the Opsive's camera perspective, and it also keeps following the position of the mouse.
    I recorded a video and uploaded it to my Dropbox to illustrate it better:

    It's a simple setup: Camera switches to the Keypad Camera, Control changes from directional and finally Hotspot Detection is switched to MouseOver.

  • edited May 24

    AC will rely on the scene's "Main" camera for raycasting, and IIRC Opsive's main camera needs to be tagged as such.

    However, it is possible to force a specific camera to be considered AC's main camera by first checking Cache 'Camera.main' variable? in the Settings Manager, and then setting it through script to the AC MainCamera when you wish to:

    AC.KickStarter.CameraMain = KickStarter.mainCamera.Camera;
  • A new UCC integration package is now available on the Downloads page.

  • edited July 29

    Great news! Thanks so much for the update! It seems to be working fine now, except the camera goes crazy every time it has to transition from a fixed camera to the gameplay one. It blends ok if the path is more or less a direct line without rotations, but goes totally crazy when it has to blend while making a 180 turn.

    Again, thanks so much for updating the integration! You're doing such an amazing job supporting the AC! But do you think the transition bug is something you're going to fix, or should I drop the feature and use good old camera switching instead?

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.