Forum rules - please read before posting.

Switching from custom movement controller (Opsive's TPC) to AC's

I am using Opsive's Third Person Controller as a custom movement controller in Adventure Creator.  It uses Direct movement with Mouse/Keyboard.  I want to be able to use the Hotspot Player Action -> Move To so when the player clicks a Hotspot, control is taken away from them and they move to the Hotspot using the NavMesh.

How can I enable this?

Right now when I add a Move To player action to the Hotspot settings, nothing happens.  I have my Settings on Unity Navigation in AC, but my movement is Direct (which I need for the custom controller).

Thanks!


Comments

  • I suppose you could just add a marker to go to for the start of each interaction rather than relying on the option in the hotspot itself.
  • But if I'm using a custom movement system, do you mean to use the "System change" actions to switch to AC, Walk to the point, and then System change back to Custom?  

    That was going to be my last resort if that works.  Was hoping there was something a little more elegant.
  • mekmek
    edited July 2018
    Actually, that doesn't seem to work even.

    For AC movement to happen, it seems you have to switch Animation settings -> Animation Engine to "Mecanim" from Custom, and Animation Settings -> Motion control from "Manual" to "Automatic" in the Player script on your player.  There doesn't seem to be a way to do that through AC actions? 
  • mekmek
    edited July 2018
    I went ahead and made my own in Playmaker.

    I am attaching this method below for anyone in the future running into this issue.

    First, make an FSM and attach it your Player.
    Make 2 Events (ACMotion and OpsiveMotion) that can be called from AC.



    The actions for those states:







    Remember, to Set Property in a script, you just drag the script from your Player prefab into the Playmaker window.

    Now, in AC, create an ActionList asset with the following parameters:


    Since this uses Parameters (make sure to check Use Parameters on the ActionList in the Inspector), you can reuse this ActionList wherever you want, simply enter the new Marker.

    Lastly, AC motion uses the animation float "Speed" to dictate movement.  Something like Opsive Controller uses "Forward" - so make sure to add a new State in your animation controller that is run via the Speed variable:





    *Note* Make sure to assign your Animator in the Animator slot of the Player Mecanim script

    Hope that helps others!
  • Thanks for posting.  There's actually a couple of ways this can be done without relying on PM - and Opsive themselves have an AC integration package on their site.

    The "Motion control" setting indeed determines whether or not your character is under AC control or custom control.  One approach is to change this value accordingly in an Update() method - see the Unity Third Person Controller integration.

    Another approach, outlined by this tutorial, is to instead read the Player script's GetTargetPosition value when appropriate (e.g. in a Cutscene or given a Path), and have the custom controller itself move to that destination.
  • Thanks Chris - I'll look into those as well
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.