Search Unity

Third Person Controller - Third Person, AI, Multiplayer, Mobile Framework

Discussion in 'Assets and Asset Store' started by opsive, Jan 21, 2015.

Thread Status:
Not open for further replies.
  1. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    It doesn't look like my reply when through yesterday. You can set the CameraMonitor.TargetLock transform but that will have the camera look at that transform as well. I like the idea of having a separate target though just for IK so I've written it down. Right now it would take modification within CharacterIK.
     
    Alvarezmd90 likes this.
  2. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    151
    Hm.. haven't downloaded the source code yet so I can't modify any scripts yet.

    Another thing I noticed when programming an interact text popup like: ;"Get key", "Move block" and "Open door"
    is that this works correctly:
    Code (CSharp):
    1. GetComponent<Opsive.ThirdPersonController.Interactable>().CanInteract()==true
    Code (CSharp):
    1. GetComponent<Opsive.ThirdPersonController.MoveableObject>().CanStartMove()==true
    But this one always remains true except for when dragging. This way I need to also modify the MoveableObject script to only return true when within the distance for the player to interact with it. I know it sounds vague, but it basically means the popup to move the object is always there.
    I also want climbable vines and ladders to have a popup text on my custom hud.
     
  3. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Instead of checking the MovableObject you should instead check the actual ability if it can start using Ability.CanStartAbility.
     
    Alvarezmd90 likes this.
  4. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    151
    Could you please show me an example of checking one in particular?
     
  5. cybersoft

    cybersoft

    Joined:
    Feb 12, 2014
    Posts:
    107
    Hi,

    I am your customer because of the great Behavior Designer. Your programming is clean and really like it.

    I actually wanted to buy your existing TPC or Third Person Motion Controller (ootii) on sale now.

    On the other hand, in next few months will be the newest TPC version 2.0.
    And that is great news.

    What about all these integrations in the new version 2.0:

    - A* Pathfinding Project
    - Adventure Creator
    - Apex Path
    - Behavior Designer
    - Cinema Director
    - Control Freak
    - Dialogue System for Unity
    - Easy Touch
    - Edy's Vehicle Physics
    - Final IK
    - Gaia
    - Horse Animset Pro
    - ICE Creature Control
    - InControl
    - Inventory Pro
    - Morph 3D
    - ORK Framework
    - Playmaker
    - plyGame
    - PuppetMaster
    - Rewired
    - UMA

    What about the upgrade price?
    I know it will be reasonable, but ...

    New version and massive bugs...?
    I can imagine you have a lot of beta testers around but the market is a different story. Each new version needs some time in order to be stable.

    I think this uncertainty makes the buying more difficult and has a negative impact on other buyers like me now too.
    And that leads in practice to risk avoidance.

    What I personally think? Simple wait and not buy now.
    Am I wrong?
     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    I'll make sure TPC 2.0 has integration with the Dialogue System for Unity and Quest Machine within a week or so of its release.
     
  7. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Code (csharp):
    1. GetComponent<MoveObject>().CanStartAbility()
     
  8. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Appreciate it!
    It will not have all of the integrations upon release, but I'll slowly add them over time similar to the existing version. Behavior Designer will definitely be there upon release, and @TonyLi mentioned that he'll be bringing Dialogue System and Quest Machine support shortly after. All of the existing input integrations should transfer to v2 pretty easily as the input base class didn't change too much. Malbers with Horse Animset Pro is also planning on having an integration ready to go pretty quickly after the v2 release.
    We haven't completely decided on this but we'll probably go with the standard upgrade pricing for perpetual software and do an upgrade price of 50% of the full product price. The Third Person Controller will be increasing in price to $95.

    I'm not saying there aren't going to be any bugs upon release, but we've spent a lot of time on polishing this asset so I don't expect anything major. Of course if there is something I'll get it fixed as soon as I can.

    That's a perfectly logical route. I always go with the thinking to not purchase the asset until you actual need it. That way even if it goes on sale the next day you got some use out of it. In the end assets aren't that expensive compared to the amount of time that they save you so if you just want to get a feeling for how the existing controller is setup then that's also valid. Who knows - you may have a very small prototype idea that can be fleshed out in a month or two before v2 is released.
     
    Deckard_89 and TeagansDad like this.
  9. cybersoft

    cybersoft

    Joined:
    Feb 12, 2014
    Posts:
    107
    Thank you very much for that important information due to prices, integrations etc. That will be helpful not only for me.

    I am going to wait for the new great version 2.0 because I do not want to invest my time and effort in older asset now.
     
  10. jstoeffler

    jstoeffler

    Joined:
    Oct 22, 2016
    Posts:
    10
    Hello,

    Thanks for this great asset, it takes a while to understand every aspect, but it's totally worth it.
    I have a strange problem that I don't understand: my character (humanoid, networked) won't go left, right or backwards using the keyboard, if the controller is in "Combat" mode. It will just go forward. I can look around with the mouse, jump with space key, and shoot with the mouse, but going sideways or backwards doesn't work.

    If I put the controller in Adventure mode, then it works.
    Also if I disable "Use Root Motion" then it works (it is possible to go backwards and sideways in combat mode if I disable use root motion).

    Could you point me where the problem could be? Thanks

    (Edit: clarified the Use Root Motion Problem)
     
    Last edited: May 8, 2018
  11. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Glad you're enjoying the controller!

    Does the same thing happen within the network demo scene if you import the controller into a fresh project? The network demo scene uses a combat movement type as well so it should be a pretty good test.
     
  12. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    151
    I have no idea how to call this. I cannot call it from RigidbodyCharacterController. 0__o
     
  13. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    You can call it from the same location as your previous code. Abilities are just MonoBehaviours so you can use GetComponent like normal.
     
    Alvarezmd90 likes this.
  14. jstoeffler

    jstoeffler

    Joined:
    Oct 22, 2016
    Posts:
    10
  15. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    I haven't used those characters before but as long as they are humanoid it shouldn't require changing the animator at all. I have a few more questions:

    - Did you replace any movement animations?
    - Does the Synty character work correctly in non-networked mode?
     
  16. jstoeffler

    jstoeffler

    Joined:
    Oct 22, 2016
    Posts:
    10
    I have restarted from scratch to re-create the character and it seems to work.

    I did actually replaced the whole animator and took the animator from "Adventure" (because it has the weapons I need), I think the problem is from here. Now I have the "Shooter" animator, can I just copy-paste the animations I need from the Adventure animator ?
     
  17. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    That would cause it. The adventure animator controller doesn't work with the shooter movement type because the adventure controller doesn't include any strafing or backwards animations.

    Yes
     
  18. janiche

    janiche

    Joined:
    Jan 4, 2015
    Posts:
    52
    Before I buy it, some questions, it is compatible with node canvas and/or Cinemachine?, if is not supported, have you any plan to support that assets?
    and of course, is it compatible with Unity 2018.1?
     
  19. jstoeffler

    jstoeffler

    Joined:
    Oct 22, 2016
    Posts:
    10
    Of course, now it totally makes sense ! Thank you for the clarification.

    Another problem I'm facing now that I'm rebuilding the character, is to position a shootable weapon. I managed to make it work with a melee weapon using the documentation, but with a shootable the position is not respected

    Here's how I do it:

    1. Pause the scene while character is aiming by updating the transform



    2. Paste these values in the game object when the game is not running (and update character prefab)



    3. The game object is still not properly oriented when I re-run the game



    This incorrect orientation is different than the incorrect orientation before I updated the Transform though, so it means the orientation is taken into account, but not properly.

    Also if update the transform withe the values, then resume the game, then the item stays properly oriented.

    I don't see what the difference with the melee weapon could be.
     
  20. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    This asset seemed very promising prior to purchase. Many options, many possibilities...But when tested a lot of problems arise.

    The character builder wizard works well with a few basic settings.

    Then, the abilities system is a nightmare. It seems very useful and easy to use but the reality is when adding abilities, the basic ones (running for example) stop working. Many times, if you remove one ability, all become a complete mess and most of the rest of abilities stop working.

    It is because the abilities work or not depending on which order they are added to the character and there are not rules you can follow about it.

    Forget to use the provided scenes for helping to customize your own character and scene. The abilities system works wantonly with a character but not with other even though the rest of components and setup are the same. So, asset modularity = zero.

    Adding items is very tricky and unintuitive, and all the system is prone to errors without a clear reason and definitively it doesn`t work as expected.

    When requesting support from the author, he submit you to video links, without helping you much, but maybe because he doesn't know how to solve the issues, and the reason the problems with abilities occurs.

    About the abilities, the developer also says you have to wait to version 2 (and pay for the update) to issue the problems.
     
    Last edited: May 23, 2018
  21. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Yes to Cinemachine (the CameraController isn't required on the camera - only the CameraMonitor is which will allow you to use any camera solution). Node Canvas isn't supported nor is it planned as we have a behavior tree asset called Behavior Designer which the Third Person Controller is integrated with. If you're looking for FSM integration it is integrated with Playmaker.
     
  22. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Does this post help fix it? http://opsive.com/forum/index.php/topic,5420.0.html
     
  23. janiche

    janiche

    Joined:
    Jan 4, 2015
    Posts:
    52
    When do you think the V2 will be available?
     
  24. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    cybersoft likes this.
  25. jstoeffler

    jstoeffler

    Joined:
    Oct 22, 2016
    Posts:
    10
  26. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    330
    2 questions I have ran into:
    1: is there a way to change the speed that is allowed when aiming down sight? I won't want it to be so slow.
    2: is there a way to configure movement in the air? When jumping i would like the velocity to continue with little influence by the player input, but the player can slightly influence the path.

    Can these be done with the character controller script? I can't seen to find where these would be configured.
    Thanks!
     
  27. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    The speed of the animations or the character speed?
    On the RigidbodyCharacterController you can change the speed/damping while in the air under movement options.
     
  28. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
  29. janiche

    janiche

    Joined:
    Jan 4, 2015
    Posts:
    52
    Finally I bought it, but to download integrations and make an forum account ask for my invoice number. The problem is I bought it with some extra assets. My IN include TPC, Inventory Pro, Behaviour Designer, and some 3d Models
     
  30. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Appreciate it! That's no problem with your invoice - just make sure you've downloaded TPC and BD then you'll be good to go (the verification tool requires each asset to be downloaded)
     
  31. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    330
    Yeah the character movement speed while aiming, the speed they are allowed to walk/run during ADS
     
  32. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    If you're using root motion then that'll require new animations that implement a faster walk speed while aiming. I doesn't normally switch speeds with root motion disabled so I bet that you have root motion enabled.
     
  33. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
  34. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
  35. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I 'm also interested in moving faster when aiming. Maybe it is possible to set the RootMotionSpeedMultiplier var in RigidBodyCharacterController to a higher value just when the character is aiming, and then, set back to the default value...
     
  36. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    That's a good solution. You could create a small ability which checks for OnAim and then modifies this speed value. This is completely untested but it would be something small like.

    Code (csharp):
    1.  
    2. public class AimDetection : Ability
    3. {
    4.     public float m_Speed;
    5.  
    6.     private bool m_Aiming;
    7.  
    8.     protected override void Awake()
    9.     {
    10.         base.Awake();
    11.  
    12.         EventHandler.RegisterEvent<bool>(m_GameObject, "OnControllerAim", OnAim);
    13.     }
    14.  
    15.     public void OnAim(bool aim)
    16.     {
    17.         m_Aiming = aim;
    18.     }
    19.  
    20.     public override bool CanStartAbility()
    21.     {
    22.         return m_Aiming;
    23.     }
    24.  
    25.     public override bool CanStopAbility()
    26.     {
    27.         return !m_Aiming;
    28.     }
    29.  
    30.     public override bool UpdateAnimator()
    31.     {
    32.         m_Controller.RootMotionSpeedMultiplier =  m_Speed;
    33.  
    34.         return base.UpdateAnimator();
    35.     }
    36.  
    37.     public override bool IsConcurrentAbility()
    38.     {
    39.         return true;
    40.     }
    41.  
    42.     private void OnDestroy()
    43.     {
    44.         EventHandler.UnregisterEvent<bool>(m_GameObject, "OnControllerAim", OnAim);
    45.     }
    46. }
    47.  
     
  37. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    151
    Thanks man for the explanation! :D
    Forgot to do:
    Code (CSharp):
    1. using Opsive.ThirdPersonController.Abilities;
    Please could you show me how I could make the player automatically jump on two occasions?:
    -The player in walking or running off an edge.
    -The player is running into a very short wall.
     
  38. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    @Alvarezmd90:

    -The player is running into a very short wall.

    If I unsderstand well, in this case I would use the Vault ability with start set to automatic
     
  39. jstoeffler

    jstoeffler

    Joined:
    Oct 22, 2016
    Posts:
    10
    Hi again. I'm having another issue, this time it seems network related.

    So I run a game with a host and a client, and when one character shoots at the other, the Host crashes and I get these errors :


    I believe it's my "PistolEquipped" Item (which is a shootable weapon added on my character) causing problem.
    I tried to add the Network identity to it, but then I get

    and the exact same NullReferenceException than above.

    This only happens when I shoot at the other character, if I shoot anywhere else it works fine.

    Any idea where the problem could come from?
     
    Last edited: May 10, 2018
  40. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    This isn't a quick change so I don't have the code for this, but first take a look at the creating a new ability video/documentation:

    http://opsive.com/assets/ThirdPersonController/videos.php?id=7
    http://opsive.com/assets/ThirdPersonController/documentation.php?id=98

    This will give you an overview on how the ability system works so you know the flow of the abilities. From there what you'll need to do is detect that the character is on an edge/short wall and activate the jump ability. A good example is the Vault ability as @angel_m mentioned.
     
  41. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Does the character that you are hitting also have the PistolEquipped GameObject? You could try removing the box collider on this object to see if that helps at all.
     
  42. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    151
    Yeah, because right now, I use short climb, but it glitches into the ground sometimes. xD

    Hm I suspected that would be the case. I don't want to start a new ability completely. Rather, I'd like to start the already existing jump ability when the raytrace returns no floor ahead of the player + the player is heading for that direction.
     
    Last edited: May 10, 2018
  43. heartquinoa

    heartquinoa

    Joined:
    May 10, 2018
    Posts:
    3
    Hello. I'm having a few problems with the character controller.

    My first problem is with adding new weapons and animations to a character. What I've tried to do is duplicate the Shockwave spell in the default Adventure character. To do that I made a new PrimaryItemType called Spell, and added it to the character using the Item Builder. Then I duplicated the Shockwave animation tree on both the Base and Upper layers, and changed the animation on both to standing_1h_cast_spell_01 from here. https://assetstore.unity.com/packages/3d/animations/magic-pack-36269 When I try to play the game and use it, the animation plays once then freezes. When I check the Animator it seems like it's frozen on Attack, with the blue bar under the Attack layer filled but never transitioning.

    Could somebody run me through the process for doing this? I just can't figure out how to get the character controller's animations to work, and I can't find any info on the website as to why I need to add the same animations on multiple layers.

    I also found that when I use the default Shockwave you can still move around while the animation is playing unless you use root motion. Is there a way to stop the character from moving while the animation plays without root motion?

    Lastly, it seemed like the only way to add a Magic item was by making my spell a PrimaryItemType, giving it ammo, and then setting it to infinite. Is this correct, or is there a way to make a Magic item without giving it a consumable?

    Thanks for the help! I really want to start working on stuff but I'm totally stuck. :(
     
  44. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    My guess is that you have the item setup properly, but you're missing an animation event. When you replace the animations makes sure you also carry over the animation events:

    http://opsive.com/assets/ThirdPersonController/documentation.php?id=111

    On the item under the animator options you can force root motion for a particular state. This will prevent the character from moving while that animation is playing. Take a look at this page for an overview of that inspector:

    http://opsive.com/assets/ThirdPersonController/documentation.php?id=118

    That's correct.
     
  45. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    You could do that by subclassing the jump ability and then overriding CanStartAbility so it only returns true when your cast detects the object that you're looking for.
     
  46. janiche

    janiche

    Joined:
    Jan 4, 2015
    Posts:
    52
    I'm trying to make a conditional interaction, I mean if I have a portal key, or a specific strength skill can trigger the interaction. How can I make it? I'm using Inventory pro integration
     
  47. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    The Inventory Pro integration doesn't extend to the abilities so it sounds like you'll want to modify the Interact.CanStartAbility method and return false if the character doesn't have that item.
     
  48. jstoeffler

    jstoeffler

    Joined:
    Oct 22, 2016
    Posts:
    10
    It works 5/5 support :)
     
    opsive likes this.
  49. heartquinoa

    heartquinoa

    Joined:
    May 10, 2018
    Posts:
    3
    Yes! Thank you, that was it. Strangely, the built-in animations let me access their events directly from the animation clip using the "Edit" button, but the Mixamo ones only had the option to "open" them, so I opened the animation in the character's Animation editor and added the events.

    Why is it exactly that I have to have the same animation tree on both the Base and Upper layers though? What is the difference between them?

    Sorry I'm not really seeing where to activate root motion on a state. I assume it would be under Use State > Movement, right?

    I have something that looks similar to what you have on that site



    but I'm not seeing the Root Motion option.

    Thanks for the help!
     
  50. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    You don't necessarily need to - you can change which animations are used by setting the layer of the item animation state.

    The option only shows if you have "UseRootMotion" deselected on the RigidbodyCharacterController. I also think your character has to be enabled in the scene. Once you do that you'll have the option:

    rootmotion.PNG
     
Thread Status:
Not open for further replies.