Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Yes most of them are as simple as drag and drop. But for some animation you also have to add an event. Be sure to check if there is an event on the animations you want to replace. If so copy the event on the new one. Try with the aim or attack animation it's very easy.
    http://www.opsive.com/assets/ThirdPersonController/documentation.php?id=91
    Yere is the link reated to the aim animation
    And a link of the video of my project you can see that the aim and movement animations are differents than the default ones
     
    opsive likes this.
  2. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
  3. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    @gecko I just completed the work which will allow better support for long generic characters such as a dog or a cat. Here's a picture of a horse with multiple colliders attached:

    generic.PNG

    Since a dog or a cat isn't as tall you probably won't need multiple horizontal capsule colliders but you'll have the option to use as many colliders as you'd like. Note that you will still need at least one capsule collider attached but since you can arrange it horizontally it should fit pretty much any shape.

    This version will also allow your character to stay aligned to a slope as seen in the screenshot.
     
    RoyalAllen, Teila, drewradley and 3 others like this.
  4. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    Excellent! Any guesstimate on release?
     
  5. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    hello :)

    what is the nature of the Playmaker integration ? is there any Playmaker Actions i could download somewhere ?
    your documentation sends me to the Playmaker website .. wich sends me back to your website .. so any infos would be appreciated :)
    would it be possible to add a jetpack ability when you have time ?

    thanks
     
  6. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Not yet - we're working on a new generic scene and have a lot of new melee animations so that's mostly what will take the majority of the time now.
     
  7. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    The Playmaker integration files can be downloaded from the Integrations page. After you input your invoice number the download will be active. The Playmaker integration includes the following tasks:

    Get Current Health
    Has Ammo
    Has Current Item
    Is Alive
    Is Damaged
    Move
    Reload
    Set Aim
    Switch Items
    Use

    I just added jetpack to the future ability list :)
     
  8. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    cool .. many thanks :)
     
  9. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    As we are working on version 1.3 we're also slowly working on the Deathmatch Kit. If you're new to this thread, the Deathmatch Kit is our next asset and it'll allow for a team-based or free for all deathmatch game. This will be a Third Person Controller and Behavior Designer addon asset.

    Here's a quick gif of the latest feature that we have been working on - cover. The AI will be able to find a cover point and attack from behind it using the Cover ability.

    cover.gif

    And here's the subtree that goes along with it:

    BehaviorScreenshot.png
    This cover subtree is still a work in progress but it does show that it doesn't take too much to get this functionality working. There are only two unique tasks aren't available now - Find Cover and Cover Movement. The rest are either located in the Behavior Designer package or the Third Person Controller integration.

    The Deathmatch Kit has really helped us focus on which Third Person Controller features are needed by an actual game rather than just an asset. We're getting close enough in that after version 1.3 of the Third Person Controller is released we should be able to create a dedicated WIP thread and hopefully shortly after we'll be able to send it to the Asset Store.
     
  10. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Very cool. As you are doing this, it would be good to have a Toggle for Friendly Fire (i.e. Turn Friendly Fire OFF = you can't hurt your team members, Turn Friendly Fire ON = your bullets damage your team members too).
     
    julianr likes this.
  11. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Great suggestion!

    I know that you're more interested in UFPS, and as soon as UFPS 2 is released I plan on hooking it up with the Deathmatch Kit so you can use a first or third person perspective.
     
    99thmonkey likes this.
  12. Ludo97

    Ludo97

    Joined:
    Dec 9, 2015
    Posts:
    121
    Thank you for your reply , how do have health interface and inventory ? as in the demo , it would he a tutorial the above ?
     
  13. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Opsive,
    So looking forward to the new release!

    Something strange just happened.
    I loaded up my project in 5.4. it was working fine in 5.3.4. When I go to swing the sword, my character jumps into the ground. Nothing was changed.
    I went back to 5.3.4 version (I have it in 2 different places to make sure I didn't screw things up) and when swinging the sword all is good.
    Not sure if a bug, code, of something new with 5.4.
    Just wanted to point it out in case anyone else has this issue.
     
    Last edited: Mar 19, 2016
  14. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
  15. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Which demo scene did you try? I just created a fresh project using beta 10 and imported 1.2.2 from the Asset Store. When I swung the katana in the clean and adventure scene everything worked well. Regardless, we'll make sure the new 1.3 works with the latest 5.4 beta when it's released. Since 5.4 isn't going to be released until June we'll have plenty of time to make sure everything is working with that version.
     
  16. Ludo97

    Ludo97

    Joined:
    Dec 9, 2015
    Posts:
    121
    I use a character adventure but I want to know how to create a damage collision when the character collides in a cube and that life decreases ?
     
  17. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    When there is a collision you can call Health.Damage.
     
  18. Ludo97

    Ludo97

    Joined:
    Dec 9, 2015
    Posts:
    121
    Ok but I do not understand , I have to put her in a script ?
     
  19. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    You'll need to create a new script and call it during a collision event. If you're new to scripting I highly recommend that you first go through the Survival Shooter Unity Learn project.
     
  20. Ludo97

    Ludo97

    Joined:
    Dec 9, 2015
    Posts:
    121
    Thank you I understood , but I have another little problem when I created my character : why bust my character leans back while in the demo pre-defined characters are normal it : right as a human what. There is there a special parameter set?
     
  21. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    I'm not completely following but it sounds like you may need to make sure your model is a humanoid:

    http://docs.unity3d.com/Manual/ConfiguringtheAvatar.html
     
  22. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Hi

    Can we pickup consumable items (eg. rockets?), as I didn't see a way to do this without picking up the parent item first. I'm presuming that this would be possible using the Inventory Pro add-on though, so that rockets would be stacked and used with the TPC inventory when equipping them in Inventory Pro to add them to the rocket launcher?
     
  23. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Yes, you can (without needing Inventory Pro). I just tested this using the warehouse scene - the first pistol pickup has just the Pistol ItemType, and the second pistol pickup has the PistolBullets ItemType. I picked up the PistolBullets, and then picked up the Pistol. As soon as I picked up the Pistol all of the bullets were there.
     
    julianr likes this.
  24. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Thanks. I just copied the pickup item for the pistol bullets and swapped it out for a rocket, worked a treat! I must have been doing it wrong by copying the live rocket, stripping it out and adding in the pickup and forgetting some vital component.
     
    Last edited: Mar 22, 2016
    99thmonkey likes this.
  25. RoyalAllen

    RoyalAllen

    Joined:
    Oct 17, 2012
    Posts:
    205
    Finally Guys the video! Sorry for the wait! Third Person Controller Rocks!

     
    julianr, 99thmonkey and opsive like this.
  26. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Awesome! Thanks for creating a tutorial. It looks like at the end though you're getting a few errors and the feet are doing something wonky. Can you send me an email with those errors and we'll get it running without any errors?
     
    99thmonkey likes this.
  27. RoyalAllen

    RoyalAllen

    Joined:
    Oct 17, 2012
    Posts:
    205
    Sure can. The errors are null reference have not figure out how to fix this yet. But it does work though.
     
  28. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    I don't have Paragon AI but I'll do my best to see what could be causing it.
     
  29. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Hello I noticed that in your demo scenes the mouse cursor stay locked. But in every projects i made it unlock when I right click to shoot. Any idea why?
     
  30. RoyalAllen

    RoyalAllen

    Joined:
    Oct 17, 2012
    Posts:
    205
    Try keeping your Cursor over the game or scene tab after you hit play. Try not to move it. See if that works. Thats what I do.
     
  31. bsixel

    bsixel

    Joined:
    Mar 2, 2016
    Posts:
    7
    Hi there!
    Loving the asset, it works great with prefabs. Unfortunately I'm having some trouble getting it to work with UMA - I've got the demo from the integration package, but even in the demo I can't actually control the character. It's also not throwing any errors. Is the UMA Integration package up to date?
    Thanks for the great work!
     
  32. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    @RoyalAllen has a good suggestion. Also, are you talking about the Unity editor or a built game?
     
  33. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Glad you're enjoying it! I just tried the UMA sample with a fresh Unity 5.3 project and the Third Person Controller 1.2.2 and it worked - give it another try with a fresh project and see if you can get that working, then we can move on to your existing project.
     
  34. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Version 1.3 is turning out to be a pretty major update. We've gotten a few requests for the character to fade when the camera gets close and I was going to wait until 1.3.1 but figured it would add a nice polish to the 1.3 update. @magique

    fade.PNG
     
  35. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    @RoyalAllen, Opsive, Thank you but it doesn't works. I've noticed that it often happens when I right click It is in the editor view. could it be related to an integration conflict I use ork free version and playmaker?
     
  36. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Just found what caused the problem. It was the playmaker gui . If someone else use playmaker you have to disable "Control mouse cursor" in the "playmaker gui game object" in your hierarchy
     
  37. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Can this be turned off? :)
     
  38. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Definitely :)

    fadeoption.PNG
     
    Teila likes this.
  39. bsixel

    bsixel

    Joined:
    Mar 2, 2016
    Posts:
    7
    Hey! Just checked, it seems as though the integration scene with UMA2 works with the fresh project. I also imported Gaia, and it seems to be working fine with that as well. I'm not getting any error messages in the project where it isn't working, so I'm not entirely sure how to proceed. I am getting a warning from UMA2 about the atlas resolution being small, but I believe that is just a texturing issue and not related to being unable to control the character. I've tried updating the input manager - still unable to move the character. I should probably note that I AM able to move the cursor around and the camera with it. Thanks for the help!
     
  40. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Did you make any changes to the Third Person Controller which deals with movement? Are you using root motion? When you press the forward button does the Forward Input value in the Animator change to 1?
     
  41. bsixel

    bsixel

    Joined:
    Mar 2, 2016
    Posts:
    7
    In this project, no. I haven't even imported the source code, I'm just using the assembly. Pretty sure I left whatever settings the sample scene came with - it's still on root motion. When you say Forward Input in the Animator - do you mean the UMA animator monitor component, the regular animator component, or the animator editor window? I'm not seeing a Forward Input value in any of the above. :( Perhaps I've just spent too long staring at the same things, they're all blurring together...
     
  42. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @bsixel - do you have a controller defined in your characters Animator? Or check that your player is setup as a humanoid, and has an avatar set in the Animator on your character.
     
  43. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    In addition to @julianr's suggestion, the forward input that I'm talking about is on the Animator Controller:

    forward.PNG

    When you press the forward button this value should go to 1.
     
  44. bsixel

    bsixel

    Joined:
    Mar 2, 2016
    Posts:
    7
    It looks like I'm not getting any change in forward input, or any of the other fields. In regards to what @julianr said - It's not super clear whether there's actually an avatar assigned in the Animator, but I believe it's just because there is no single prefab used as the avatar. The external clean project with just TPC/UMA2 and the integration has the same vague answer. Because of the strange nature of UMA, I'm not sure how to check if UMA is acting as a humanoid, but it's probably safe to say it is. This is what the inspector shows for the Animator:



    As you can see, there's SOMETHING in the Avatar field, it's just... not super clear what exactly. And I can't seem to find it in the game hierarchy when selecting it.
     
  45. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Your image looks correct. My guess is that it is one of the following:

    1. The ControllerHandler component is disabled. This would prevent the animator from changing any values.
    2. There are some type of input mapping conflict. This would make the most sense if the sample scene doesn't work in your existing project but it does work in the fresh project.
     
  46. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    hi here
    he got bool for Third Person Controller auto run ?

    we got setup Behavior look close to but patrol script don't found the Waipoint

    and ia look not responding when hit doens't attack doug etc...

    NullReferenceException: Object reference not set to an instance of an object
    BehaviorDesigner.Runtime.Tasks.Movement.Patrol.OnStart () (at Assets/Behavior Designer Movement/Scripts/Tasks/Patrol.cs:29)

    NullReferenceException: Object reference not set to an instance of an object
    BehaviorDesigner.Runtime.Tasks.Movement.Patrol.OnUpdate () (at Assets/Behavior Designer Movement/Scripts/Tasks/Patrol.cs:60)

    NullReferenceException: Object reference not set to an instance of an object
    BehaviorDesigner.Runtime.Tasks.Movement.Patrol.OnDrawGizmos () (at Assets/Behavior Designer Movement/Scripts/Tasks/Patrol.cs:98)
     
  47. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    This doesn't look like it is caused by the Third Person Controller but make sure you've specified all of the waypoints within the Patrol task.
     
  48. Fraust

    Fraust

    Joined:
    Jul 2, 2012
    Posts:
    16
    Sorry if this has been brought up... but, concerning the Rewired integration... are you missing an override UseMouseInternal() ? I couldn't get my right stick to work until I added that override in the Rewired input script and checked for a connected controller in the return. Is it just me missing some other switch somewhere?
     
  49. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    ok found Patrol task reasigned but give same result
    bot continue to ignore doug // where is my doug !!!)
    :)

     
  50. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    That was missing from the integration - thank you! The Rewired dev also improved the sample so it'll have the default mappings for a controller - this version will be released when we release version 1.3 of the Third Person Controller.
     
Thread Status:
Not open for further replies.