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
    Have you tried a fresh project? I just tried the network demo scene with Unity 5.5 and didn't see those issues. Are you running instances of the server and the client on the same local machine or is the client on a different machine? Are you receiving any errors? It sounds like you are getting lots of lag but that especially wouldn't make sense if you are on a local machine.
     
  2. SkyTech6

    SkyTech6

    Joined:
    Jul 14, 2015
    Posts:
    151
    It is a fresh project (I just bought your collection of assets yesterday). I was trying it with Matchmaking with one being the editor and another being a client on the same computer.

    Could both internet connections coming from the same computer be the problem?

    ---------

    Update:

    Just tried it with two different computers on two different locations.

    Locations sync'd well. Client had some choppy movement.

    I shot him once, it delayed damage on his end. Shot him a bunch, it delayed all the damage until he died. He fell over and died on his client. On my screen (Server), he didn't fall over and die at all. And then I could no longer shoot, sprint, or other normal things other than move around.

    Here's what the console showed: http://i.imgur.com/YJCfKtj.png

    [Did second test, killed him with dual wield, damage was still delayed and once he died it didn't show dead on my screen, all controls locked up except my movement. Image: http://i.imgur.com/yVxlxCv.png ]

    -----

    Another Update:

    This error seems to be the one that makes everything break?

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Opsive.ThirdPersonController.NetworkMonitor.RpcExecuteItemEventGameObjectTwoVector3 (Int32 itemID, System.String eventName, UnityEngine.GameObject arg1, Vector3 arg2, Vector3 arg3) (at Assets/Third Person Controller/Scripts/Character/NetworkMonitor.cs:279)
    3. Opsive.ThirdPersonController.NetworkMonitor.InvokeRpcRpcExecuteItemEventGameObjectTwoVector3 (UnityEngine.Networking.NetworkBehaviour obj, UnityEngine.Networking.NetworkReader reader)
    4. UnityEngine.Networking.NetworkIdentity.HandleRPC (Int32 cmdHash, UnityEngine.Networking.NetworkReader reader) (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:659)
    5. UnityEngine.Networking.ClientScene.OnRPCMessage (UnityEngine.Networking.NetworkMessage netMsg) (at C:/buildslave/unity/build/Extensions/Networking/Runtime/ClientScene.cs:748)
    6. UnityEngine.Networking.NetworkConnection.HandleReader (UnityEngine.Networking.NetworkReader reader, Int32 receivedSize, Int32 channelId) (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:468)
    7. UnityEngine.Networking.NetworkConnection.HandleBytes (System.Byte[] buffer, Int32 receivedSize, Int32 channelId) (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:424)
    8. UnityEngine.Networking.NetworkConnection.TransportRecieve (System.Byte[] bytes, Int32 numBytes, Int32 channelId) (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:576)
    9. UnityEngine.Networking.NetworkClient.Update () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:735)
    10. UnityEngine.Networking.NetworkClient.UpdateClients () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:950)
    11. UnityEngine.Networking.NetworkIdentity.UNetStaticUpdate () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:1089)
    12.  
    -----

    Another update... shooting the other player from different angles results in sometimes doing damage and sometimes not.
     
    Last edited: Jan 26, 2017
  3. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @opsive ,

    With TPC are you bound to just Health stat etc? How easy would it be to implement lots of other core stats?
     
  4. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    It sounds like you are experiencing a lot of lag. As a test can you try a local instance of the client and the server not over matchmaking just to ensure the project works? In terms of that error, make sure any objects that can be hit have the NetworkIdentity component added to it so it can be synced across the network.
     
    Last edited: Jan 27, 2017
  5. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
  6. SkyTech6

    SkyTech6

    Joined:
    Jul 14, 2015
    Posts:
    151
    The jittering happens even on local.

    And I'm not sure what objects need NetworkTransform... it's your demo scene and objects....
     
  7. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    That's really odd, I haven't gotten any other reports of that or been able to reproduce it. Does the single server instance work? In terms of NetworkIdentity, in the next version I have added an editor check to log an error indicating the object. What object did you shoot at?
     
  8. SkyTech6

    SkyTech6

    Joined:
    Jul 14, 2015
    Posts:
    151
    The other player. It seems to only happen SOMETIMES. Perhaps might be linked to the dual wielding pistols?
     
  9. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Ah, I bet that you hit a collider on that other player which doesn't have the NetworkingIdentity component. This is a good reminder though, I need to add the NetworkIdentity to all colliders on the character.
     
  10. SkyTech6

    SkyTech6

    Joined:
    Jul 14, 2015
    Posts:
    151
    Ah. Could you tell me where those are? When I look at the rig I only see a single body collier?
     
  11. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    You can't expand the hierarchy more then one level on prefabs so you'll need to drag it into the scene. From there if you do a search for CapsuleCollider/SphereCollider and add the NetworkIdentity component to each collider you should then be good to go.
     
  12. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    Does TPC play well with Mount Points by ooti? Is Mount Points needed? Does TPC bring anything to the party in making it easier for PCs and NPCs to don and take off armor?
     
  13. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    I haven't used Mount Points but in theory there shouldn't be a conflict. If you find that there is a conflict then I can help debug it. The Third Person Controller allows you to holster weapons but that's about all that it includes in terms of mounting objects so armor would best be done with something like Mount Points.
     
  14. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    Excellent thx opsive.
     
  15. arnesso

    arnesso

    Joined:
    Mar 3, 2015
    Posts:
    96
    Hi,

    I would ask about changing walk, and run speed ,how can I modify that, only with animation speed ?

    If i would like to create start walking, start running, so each separated blend tree for walk, and run, could I do that the current parameters without new code writing ?( I m thinking of buying kubold movement asset)

    Where can I change combat camera, I would like to work Dom_Shooter with RPG camera, so if i do idle i can rotate ,any other case if i am moving forward can control with mouse.? I tried to modify in ThirdPerson state the view mode to RPG?but nothing happend .

    Thank you for you great asset and help, I can't wait for the Photon integration :)
     
  16. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    That'll require a new ability. The controller currently has both walking and running within the same blend tree.
    Make sure you also change the Movement Type on your character to RPG

    Appreciate it :)
     
  17. arnesso

    arnesso

    Joined:
    Mar 3, 2015
    Posts:
    96
    I appreciate your response :)

    I am thinking of buying ORK, i see there is integration, but I do not know how work together, because i do not want turned base fight.
    Does it possible to use only the RPG elements from ORK, as level up, classes, ?
    I would create RPG game with TPC , but i have not found nothing how should I save the character (eg. Doug stats)
    upgrade jump, or can learn new ability, how to save the stats.
    I could not found any reference who is working on RPG skill learn, and level up game with TPC.
    Thank you :)
     
  18. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    The ORK integration will allow you to use the character controller from the Third Person Controller within ORK. It does not allow for the Third Person Controller items to interact with ORK stats/damage though - this will be a change that will be easier to accomplish with version 2.
    You should be able to use a plugin such as EasySave in order to save the component values.
    Those are more game specific but as of the latest version you can disable the ability from being able to start. This would for example allow your learned ability to be disabled until the character has learned it.
     
    arnesso likes this.
  19. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Hi I just started using Third Person Controller in 2.5D mode and noticed a few issues.
    • Jumping is very floaty
    • The falling animation the character seems to be in an unnatural pose with legs together
    • When the character lands on the ground there is a slight freeze
    • Even thought the character is restricted on z axis they can move along z when climbing vines
    • The character does not grab the ladder or vines automatically (have to press F)
    • The character cannot enter/exit the ladder or vines at any point (only top and bottom)
    • The character cannot jump off the ladder or vines mid way
    • The character does not grab onto the ledges or the floating platforms
    • The character does not shoot at the mouse cursor (he always misses)
    I've found this to be anything but 'smooth'. As for 'flexible' I will try modifying it to suit my needs but at this stage it looks as though it may not be suitable at all.

    [EDIT: I've tried modifying a few of the settings but overall it feels like I'm trying to fit a square peg into a round hole. I've sent you an email regarding a refund and it seems I will have to limit my scope and focus on 2D as in a platformer smooth control has to be my number 1 priority before fancy 2.5D mechanics like cover and switching between background/foreground.

    I had a brief play with the 3D game modes (the primary focus of this asset) and this asset seems fantastic for this and this is supported by the hundreds of sales and glowing reviews, and there's definitely a lot of features here for 3D games. Unfortunately it just doesn't seem suitable for my purpose which is primarily 2D.

    I may revisit this for a future top-down project especially once the ray-casting version is released, but at this stage I will limit my current project to 2D.]
     
    Last edited: Feb 3, 2017
  20. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    I responded to your email - I have some tips that should be able to help with a 2.5D setup to get the gameplay that you're going for. Lets move the conversation to email to keep it less confusing :)
     
  21. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Thanks for your fast response and all of your tips and suggestions. Great developer!
     
  22. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    It's time for round 2 of the animation tests :) You can try it out on this page. Now that the foundation is in place we should be able to do these builds a lot more often (although with this build I did hit a Unity WebGL error that would otherwise add some neat functionality - the bug report has been submitted and hopefully Unity will fix it before 5.6 is released ;))

    AnimationTest2.png
     
    Gametyme likes this.
  23. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @opsive , is this asset compatible with dk uma premium?
     
  24. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    I haven't used DK UMA before but I know that there was an integration for it by the DK UMA dev. You could email the DK UMA dev to see how to get that integration or what the status of it is.
     
  25. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @opsive , have done. Theyre err not quite as quick at responding though... ;)
     
    TeagansDad and opsive like this.
  26. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    @Duffer123 - With a bit of work setting things up, you can replicate most of DK UMA functionality with the upcoming UMA 2.1 and its new Dynamic Character System (DCS). It's available in the Unity53 branch in the IMA GitHub.

    DK has some cool features, but it's another layer of complexity in top of an already complex asset (UMA).

    It's worth checking out if you're not already invested in DK UMA Premium.
     
  27. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @TeagansDad ,

    Many thanks. Havent bought anything DK yet. Will check out UMA 2.1. Thx
     
  28. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    I like the combat version.
     
    opsive likes this.
  29. MitchStan

    MitchStan

    Joined:
    Feb 26, 2007
    Posts:
    568
    Love your assets - both Behavior Designer and Third Person Controller. Slowly learning them both.

    My daughter and I want to try to take a character and be able to "shape shift" to other characters. So for starters, start out as Unity Chan and at the press of a key, change to Ethan.

    Is this something we can accomplish with Third Person Controller. If not, we can roll our own. But if we could do this with your system - any advice or pointers in the right direction?

    Thanks for any help. And thanks for some great assets and top notch support.

    Mitch
     
  30. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Glad you're enjoying our assets :)

    The Clean Scene should actually provide a good example of switching characters - in that there are about five different characters demonstrating the different movement types. Take a look at the DemoManager.SwitchCharacters method - the key is to call GameObject.SetActive and set the CameraController Anchor property to the new character. In your case you'll also want to change the position of the new character to the location of the old character and maybe add some effects to make the transition smoother, but that should at least get you started.
     
    MitchStan likes this.
  31. MitchStan

    MitchStan

    Joined:
    Feb 26, 2007
    Posts:
    568
    Thats great! Thanks for the tip.
     
  32. Testeria

    Testeria

    Joined:
    Aug 15, 2013
    Posts:
    18
    Hello,
    have a question: would TPC work with ferr2d? I have 3d mesh player with ferr2d terrain and it works well, now I'm considering replacing my own animations and player controller with TPC.

    But is support for 2,5d ready? Do You have some tutorial with future list/presentation for 2,5d/platformer like games? I'm plannig to use BD for enemy movment (already owned).

    Thanks,
    ps. sorry for my english, hope it is understandable
     
  33. shafqat_jamil

    shafqat_jamil

    Joined:
    Mar 30, 2014
    Posts:
    9
    hi, please help me i have a problem, Shoot button is not always working on android in demo scene.
     
  34. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Thanks for taking a look at the Third Person Controller!

    I haven't used Ferr2D but does it only generate 2D colliders for the terrain? In order for the character controller to recognizes the ground you'll need to use a 3D collider. Besides that there shouldn't be a problem.

    Yes, it is ready for 2.5D. There is an included clean scene which shows the 2.5D movement type - basically you just set the character controller and camera to 2.5D and you're good to go. All of the 3D features are supported within the 2.5D mode.
     
  35. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Have you imported the source code (this is required for the code to detect the correct platform). If you've imported the source, which demo scene are you referring to? And does it work sometimes?
     
  36. shafqat_jamil

    shafqat_jamil

    Joined:
    Mar 30, 2014
    Posts:
    9
    yes i have imported source code and its third person shooter scene, and yes it works some times
     
  37. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Under what conditions does it work/not work? Can you list the steps to reproduce from a fresh project of it not working?
     
  38. shafqat_jamil

    shafqat_jamil

    Joined:
    Mar 30, 2014
    Posts:
    9
    its random, some time i change weapon with switch button and its start working and some times its not.
    one more problem i am facing is when i restart the scene from code player does not move and shoot at all.
     
  39. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Can you please send me an email to support@opsive.com? I'll help debug it without adding a lot of noise to this thread.
     
  40. shafqat_jamil

    shafqat_jamil

    Joined:
    Mar 30, 2014
    Posts:
    9
  41. Deleted User

    Deleted User

    Guest

    When will UFPS 2 get released? There is no UFPS thread here in Unity forum thats why I ask here. I hope it gets released this half of the year and please no early access / beta software with incomplete features etc.


     
  42. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Version 2 is still many months away but it'll definitely be 2017. The structure is in place and we are building it up from there. As we get closer to release we'll be doing more demos and asking for more and more feedback.
     
    Deleted User likes this.
  43. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @opsive ,

    Is there a link to somewhere where i can see the sorts of things lined up for v2?
     
  44. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    We haven't posted anything too extensive but we are taking the best parts from UFPS and TPC and joining them together :) They will still be separate assets, but a lot of the classes will be the same so you'll easily be able to switch perspectives.
     
    arnesso likes this.
  45. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    Ah. Makes sense.
     
  46. MitchStan

    MitchStan

    Joined:
    Feb 26, 2007
    Posts:
    568
    Can you advise me how to solve the following scenario:

    I have a scene set up with no character in the scene. The user first has to choose the character from a list. The character choosen is then instantiated from a prefab. The prefabs have been properly configured for Third Person Controller.

    How do I link the CameraController Character field to the new instantiated character? I get a ton of error messages because the Camera has no target to follow. I studied your clean scene and I see you manage to do it there and switch between various characters, but I'm just not getting it. I think my coding experience is falling short.

    Any advice on a simple and easy way to solve this?

    Thanks for any help.

    AFTERTHOUGHT - Upon further review - I may as well just replicate your clean scene - have all the characters in the scene but deactivated - and start off with one default character active. That should solve this issue - and the just go from there.

    Thanks for the advice!:)
     
    Last edited: Feb 12, 2017
    opsive likes this.
  47. MitchStan

    MitchStan

    Joined:
    Feb 26, 2007
    Posts:
    568
    New question - Quite a few characters on the asset store come compete with animations and an animator controller. So if I use your third person controller on these characters should I be removing the included animations and controller and start with a clean slate and your asset?

    Or do I use the included animator and animations and build on that with your asset?

    I'm just trying to get a good understanding of the workflow.

    Thanks for your help.
     
  48. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    To prevent updates from clearing out the work that you've done I would duplicate one of the existing animator controllers and start modifying from there. You can then remove the states that you don't need and replace the animations with the ones that you want to use. You aren't able to use the animator controller that comes with the character because the animator needs to be setup to work with the Third Person Controller.
     
  49. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    @opsive

    I have just one question as I haven't found it in skimming the forum posts yet, and worst case I believe I'll still be buying TPC, so an honest and candid answer is appreciated.

    With the aquisition of uFPS, will TPC automatically get an update that provides FPS switching free of charge for existing TPC customers (will TPC + uFPS be rebranded to a new product?)?
    Or will it be an integration where we still have to purchase both packages? And if so, will there be an "upgrade" discount on uFPS or TPC if you already own the other?

    With the merger of the two products, it becomes a no-brainer for any system even locked in either view to utilize these, it would be a fantastic tribute to the community if this became a single package covering both territories and expanding out into the edge cases the way TPC has for isometric and top down views.

    Thanks for your time, and keep up the good work.
     
  50. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    Thanks for taking a look at the Third Person Controller!

    UFPS and TPC will continue to be independent assets on the Asset Store, just sharing the core components so you can easily switch perspectives. I would like to provide some type of bundle discount if you get both but right now the Asset Store doesn't have that functionality unless I submit a separate bundle package to the store. This then makes maintenance more of a pain so what I'll probably do is offer a bundle on opsive.com until the Asset Store adds in the functionality (they are aware of this feature request and I think some changes are brewing on the Asset Store side of things).
     
Thread Status:
Not open for further replies.