Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,835
    In case anyone visiting these forums doesn't already own TPC, it's part of the Madness Sale right now and is going for only $49. I highly recommend it.
     
    Tinjaw and opsive like this.
  2. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    882
    got ia ready ? or need behavior for work ?
     
  3. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    The AI integration needs Behavior Designer to work. The controller is setup in a way though that it can work with any AI solution, it'll just take some extra work depending on which package you want to use.
     
  4. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    191
    I'd really appreciate it. I can get the character to move along the waypoint, but he doesn't walk or run to the path. He's just in one place.
     
  5. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    With all of the pathfinding integrations I needed to tell the pathfinding agent not to move so the controller can do its own movement. This will then allow the controller to play the correct animations. I'm imagining that you'd need to do something similar with SWS. Does SWS have a callback method for when the object should move?
     
  6. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    191
    I'm not sure i'll check. But i needed the simple waypoint system just for an NPC to move at random.
     
  7. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,815
    Been a while I was following the evolution of this package. Noticed it was on sale today. Even though I don't have time to create anything right now I decided to pick it up. Downloaded, installed in a blank new project. Updated the inputs, then I tried the 3rd person shooter demo. I noticed something that looks like a terrible bug. I really didn't dive deeply into this so I can' really tell if some of my settings are wrong though.
    It's super easy to reproduce and happen 100% of the time: press jump bar without any movement ( WASD or arrows) and the character starts the jump ("jump start" in the animator) then move on to "jump up" and play that loop forever... The only way to get out of this is if you add a movement input (WASD or arrows) then it replays the jump sequence from the beginning. Also once you're in that never ending loop, when shooting the barrel it kills you when exploding ( which is right because of its proximity) however after the respawning you're still in the "jump up" never ending loop animator state...
    Not sure if that's just me...
    Edit: glad to see your package is on sale. really sorry for you regarding all the support requests that are gonna come your way. Hope you'll be able to sleep in the coming weeks...
     
  8. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Thanks for your purchase! This post has the details, but it's a timing issue with the jump transition within the shooter controller. Here's what Sarah said:

    We'll be ready :) The Third Person Controller has been released for just over a year now so hopefully all of the major kinks have been worked out.

    Edit: I can see the jumping timing issue becoming a common question so we'll submit a new version now that has a fixed shooter controller.
     
    rosor likes this.
  9. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,815
    Thanks for your answer. Hope I'll be able to find some time in order to create a character to play around with this kit.
     
    opsive likes this.
  10. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Awesome. Short term we'll be releasing version 1.3 which will be focused on the item system. We also have a pretty cool demo scene planned for this which should demonistrate some of the lesser used features. Around the time that the update is released we should be able to talk more about the Deathmatch Kit.
     
  11. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Hello I've just updated TPC (deleted the previous version and imported the new one) on my project and imported the source code and now I have error messages on the console when I run the game theses errors keep writing on the console and after few seconds on play I have 999+ red errors. There are only two differents messages
    the 1st
    Unable to find property m_SkinMovingPlatformStickiness
    UnityEngine.Debug:LogError(Object)
    Opsive.ThirdPersonController.Editor.InspectorBase:propertyFromName(SerializedObject, String) (at Assets/Third Person Controller/Editor/Inspectors/InspectorBase.cs:49)
    Opsive.ThirdPersonController.Editor.RigidbodyCharacterControllerInspector:OnInspectorGUI() (at Assets/Third Person Controller/Editor/Inspectors/Character/RigidbodyCharacterControllerInspector.cs:143)
    UnityEditor.DockArea:OnGUI()
    the 2nd
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:190)
    UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6837)
    UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6819)
    Opsive.ThirdPersonController.Editor.RigidbodyCharacterControllerInspector.OnInspectorGUI () (at Assets/Third Person Controller/Editor/Inspectors/Character/RigidbodyCharacterControllerInspector.cs:143)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1211)
    UnityEditor.DockArea:OnGUI()
     
  12. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Sorry I closed and re started unity and everything is Ok. Sometimesthere are good supernatural phenomenons
     
    opsive likes this.
  13. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    There's a new version on the Asset Store which has the shooter controller transition time fixed (mention by @rosor in this post). If you are not using the shooter controller then there's no need to update.
     
    rosor likes this.
  14. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,815
    Great!
     
  15. MegaFlash

    MegaFlash

    Joined:
    Dec 29, 2014
    Posts:
    18
    Bought it yesterday, part o the Asset Madness Sale, Also let people at Atavism know that you send them an email. The lead programmer should be in touch with you really soon.
     
  16. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Just got an email from Andrew - we'll see what we can do :)
     
    MegaFlash likes this.
  17. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I have a request for the future: could you set up gui slider (like force field) for stamina? Or even a switch to use the force field slider. I can do it myself, but it would be nicer to have it built in so I don't have to every time I update. :)

    Thanks!
     
  18. KWaldt

    KWaldt

    Joined:
    Nov 1, 2013
    Posts:
    123
    Hello there!

    I got this Asset today and I have a few questions concerning zooming with the mouse wheel
    You wrote here that you might implement this in the next update - did this happen, and if yes, how do I activate it? I played around with the zoom settings in the camera, but I didn't manage to use it.

    Also, thank you for the great asset, it's working nicely so far, and I appreciate the work you put into the interface!

    - KW
     
  19. RoyalAllen

    RoyalAllen

    Joined:
    Oct 17, 2012
    Posts:
    140
    Yes I too agree I am working on a way to fix it for my game so shooting can be accurate in both First Person and Third Person.
     
  20. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Do you mean a UI slider which controls the stamina amount? We currently do not have any interactive UI elements so I want to keep things clean and only have more informative elements.
     
  21. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Great to hear that you're enjoying it! Yes, you can zoom with the scroll wheel. On the Camera Controller there are three properties:

    Step Zoom Sensitivity
    Min Step Zoom
    Max Step Zoom

    Try values such as 5, 0, 1 for the sensitivity, min, and max. The sensitivity determines how quickly the step zoom should work. Min and max restrict the amount of zooming that you can do - a value of 0 for the min will keep the camera where it is currently positioned.
     
    KWaldt likes this.
  22. KWaldt

    KWaldt

    Joined:
    Nov 1, 2013
    Posts:
    123
    Great, thank you!
    I have another question concerning this--I set the zoom values to 20/0/3.5, and the z offset to -4, so that the player has the possibility to zoom out a bit. However, this also starts the game zoomed out , while I'd like it to start zoomed in (at around -1.5 offset). Is there a way to do this, maybe with a script? As far as I understand, the camera offset needs to be the maximum distance from the player, as the mouse wheel zooms only in and not out. How could I set a default value for how zoomed in it is on game start?

    - KW
     
  23. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    No, not one that controls the stamina but simply displays it like the health and force field currently do. That way the player can see how much stamina they have. What I usually do is edit it so the stamina displays instead of the force field.

    Also, it seems the terrain bouncing has returned. Reducing the radius of the capsule collider helps, but I'm pretty sure it wasn't happening at all in the previous version.
     
  24. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    The step zoom amount is controlled with the m_StepZoom private variable. What you could do is set this value to 1.5 at the start and then you'll be able to zoom in/out from the beginning.
     
  25. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    The previous version caused some other problems so I had to reduce the effects of the change. Are you still testing it on the ORK terrain? When I tested on this terrain I wasn't able to get the bouncing to occur even with my changes.
     
  26. KWaldt

    KWaldt

    Joined:
    Nov 1, 2013
    Posts:
    123
    Ah, that'S GREAT! However, I'm not quite sure how to go on about this. I thought that maybe I could reach it with something like this:
    Code (CSharp):
    1. void Start()
    2.     {
    3.         this.GetComponent<Opsive.ThirdPersonController.CameraHandler>().StepZoom = 1.5f;
    4.     }
    However, since it's a private variable, I can't it from a different script (if the path if even right).
    I would hardcode it, but MonoDevelop couldn't find a "m_StepZoom" in the Scripts, only "m_StepZoomSensivitity". (The API also said that it's get only.)

    Sorry for being so inexperienced, I hope I'm not asking too much - and I appreciate your support!

    Best Regards,
    Kristina Waldt
     
  27. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    m_StepZoom is a private variable within CameraController. What you could do is add a public property to expose this variable:

    Code (csharp):
    1.  
    2. public float StepZoom { get { return m_StepZoom; } }
    3.  
    You'll then be able to use your existing code to change it:

    Code (csharp):
    1.  
    2. this.GetComponent<Opsive.ThirdPersonController.CameraController>().StepZoom = 1.5f;
    3.  
     
  28. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I am. It's not nearly as bad as before. Part of the problem was I didn't change the fall settings which default to 0 fall height. But even after putting that up to 1 it still happens. Changing the collider radius to .24 pretty much eliminates it. Still happens VERY rarely and only for a short while. It seems to happen mostly during a jump.
     
  29. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    If you set the fall height to 0 and change the collider radius back to the default, is there a particular point on the map where you can always get the bouncing to occur?
     
  30. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    With the radius set to .3 and fall height set to zero, it happens pretty much every single time I jump or go over any slightly rough terrain. I noticed that Doug (the one set up for ORK) has a radius of .2. PErhaps that's why it's not happening for you.
     
  31. KWaldt

    KWaldt

    Joined:
    Nov 1, 2013
    Posts:
    123
    Hello!

    Thank you for the response! However, I still get the same protection level error, this time in the CameraController. Did I do it wrong?
    Code (CSharp):
    1. public class CameraController : Opsive.ThirdPersonController.CameraController
    2.     {
    3.         // Intentionally left blank. The parent class has all of the implementation.
    4.         public float StepZoom { get { return m_StepZoom; } }
    5.     }
    I use the compiled version, do I need to extract the source code like I've read in the documentation or something?

    - KW
     
  32. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Has something changed with the cross hairs? Ever since upgrading, I end up with a white blob instead of a cross hair.
    edit: had to assign up, down, etc cross hairs. Didn't it used to ignore it if you had a weapon that didn't have those like the fist?
     
    Last edited: Feb 24, 2016
  33. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    I've been trying to reproduce this with the ORK demo scene and even with a radius set to 0.3 I'm not able to. Can you send me a PM with the scene and character prefab that you are using?

    There was one change to the CrosshairsMonitor to allow it to work better when unregistering from an event. The base functionality shouldn't have changed though. As an example the shooter scene the fist doesn't have a left, right, up, or down sprites assigned but it doesn't show a blob.
     
  34. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Yes, you'll need to use the source version to make that change. From there you can use the base CameraController (and not the wrapper) class.
     
  35. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I'll see what I can do tonight after work.
    Could it be because the player is spawning and not already in the scene?

    BTW, does this still require V Sync? Took me forever to figure out why my build wasn't working properly - the camera was non-responsive in the lower qualities but worked fine in better quality. Once I changed all the quality settings to use V Sync, it worked as expected. Drove me crazy figuring out that one!
     
  36. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    I don't think so. The underlying logic didn't change, just how that logic was performed changed. I just tried the network demo which doesn't have the side sprites and didn't get the white dots on that either. Are you able to reproduce it with any of the demo scenes? Alternatively, with the terrain scene that you are sending me if you can get it to show the white dots that would also work.
    I have never messed with the VSync settings and just tried with it off and noticed a slowdown with the camera pans, only sometimes. I wonder what would cause this - the panning speed is controlled by the sensitivity of the mouse which I wouldn't think would change with the VSync settings.
     
  37. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Yeah. I drop my player in any of the demos and the cross hair goes all blobby. However I just discovered that switching weapons resets the cross hairs and the blob is no longer there even when I switch back to the weapon that the blob was showing up for.
    That's why it took me a very long time to figure it out! First I had to figure out that it worked in one quality and not the other by accident. I kept trying lower qualities, thinking my laptop just couldn't keep up. Then I tried it in a higher setting by accident once and it worked great. Tried lower setting and it stopped. Dug and dug until I figured out the qualities that didn't work all had no V sync and the ones that did work had it.
     
  38. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Just sent you a link to download my character. Let me know if there are any issues.
     
  39. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Did you send me a PM or email? I didn't receive anything - can you try it again?
     
  40. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    191
    I got a question, does this controller have a sliding mechanic. Like if you're on a slope you slide down.
     
  41. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    There is no sliding mechanic though I have had that ability on my to do list. Depending on the level of control you want you may just be able to set the physic material to a frictionless material and the Rigidbody will slide according to Unity's physics. For this to work you'll also need to set the Ground Friction Material on the RigidbodyCharacterController to a near frictionless material.
     
  42. KWaldt

    KWaldt

    Joined:
    Nov 1, 2013
    Posts:
    123
    I downloaded the sourcecode and it works beautifully now, thank you!

    Another question--do you support a lock on system for enemies (meaning that the player orbits/strafes around them once focused), or do we have to write our own?

    Best Regards,
    Kristina Waldt
     
    Last edited: Feb 25, 2016
  43. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Wait until version 1.3 and then we will :)
     
    drewradley and KWaldt like this.
  44. KWaldt

    KWaldt

    Joined:
    Nov 1, 2013
    Posts:
    123
    That's great to hear, thank you! =)
     
  45. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,835
    Nice! That would be an awesome feature.
     
  46. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I emailed it the first time to the address on your website. I just now PMed it to you.
     
  47. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    I've mentioned that in the next version we are going to be revamping the item system so I wanted to show a little preview of the interface that I've been working on.

    My goal with this revamped item system is to make the item system aware of the ability system so you can play item-specific animations per ability. The example that I have been using is that I want to make it possible to play a regular attack, moving attack, or smashing attack. The regular attack will play when the character is idle. The moving attack will play when the character is moving. The smashing attack will play when the fall ability is active. Furthermore, you should be able to play different variants of each type of attack. With that said, here's the interface that exists in the current version:

    katana use states.PNG

    With the current version if you want to even do something fairly simple - such as playing a attack animation 1 when you are moving and attack animation 2 when idle - you are unable to. This is because the Use State is unaware of if the character is idle or moving. It will always play the "Attack Right" and the "Attack Left" animations. In this version we can completely forget about trying to play a specific item animation when a specific ability is active.

    So that is the old, here's a screenshot of the new:

    new use state.PNG

    It looks complicated but it's actually pretty easy to understand once you get the hang of it. The interface had to be beefed up to allow for the flexibility that I was aiming for. If you compare the two screenshots at the highest level you'll see that there is no longer an Idle or Movement state - instead it has been grouped into the Default States field. This is because the child object now can distinguish the character being idle, moving, or playing an ability. Aim, Use, Reload, Equip, and Unequip are still there like before.

    In the screenshot the Use States foldout is expanded so I'll go through that. The first thing that I filled in is the Attack Idle animation name within the Idle state. This means that if the character is idle, and you attack, it will play the item's Attack Idle state. There is a similar setup for the Movement State where if the character is moving then it'll play the item's attack movement animation.

    The last foldout, Ability States, is where things get interesting and the true power of the new item system comes into play. We have the Fall ability selected with two different animation names: Normal Attack and Smash Attack. This means that when the Fall ability is active and you attack it will play one of those two states.

    This new interface also shows the "State Order" field which is an enum now instead of the "Sequential States" bool. It's now an enum to allow for greater functionality which I'll get into as soon as I have that part fleshed out more. I have some really cool ideas with this field ;)

    Before we release this next update I am going to want to get some beta testers to give it a try and give any feedback. Since this interface can be intimidating at first I also plan on creating a video explaining it around the time that we release the update.

    Tagging a couple of people who have expressed interest in this system: @OneShotGG @magique
     
    TeagansDad, drewradley and TonyLi like this.
  48. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,835
    Oh, yes. I will definitely beta test. This is something I definitely need.
     
  49. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,844
    Awesome - I'll let you know. Yeah this system will be extremely useful for melee items. Shooter items don't really need it as much but it would still be useful.
     
  50. Filhanteraren

    Filhanteraren

    Joined:
    May 14, 2014
    Posts:
    47
    Hi, I´m looking to buy TPC and just wanted to know if and how it integrates with Final IK and PuppetMaster. Im currenlty using both system heavily in my character setup and would like to continue to do do. Thanks
     
Thread Status:
Not open for further replies.
unityunity