Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview 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. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I should add im loathe to looking into some other system to get the result i want so with great self interest i hope you have a good look at it
     
  2. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Makes sense - so in order for PuppetMaster to work the character has to use a kinematic Rigidbody? That seems restricting. Partel's integration completely disabled the Third Person Controller character controller when PuppetMaster was active. It sounds like you want to do something a little different where you want both the character controller and PuppetMaster to be active. In that case I would think that PuppetMaster sits on top of the character controller and the character controller doesn't even have to know that PuppetMaster is active (similar to how FinalIK works)

    Definitely - this week we are putting the finishing touches on the new abilities going into 1.2 and then I'll be going through all of the integrations to make sure they are up to date. When I do this I'll take a closer look at PuppetMaster to see how it works, but if we can get it working ahead of time then all the better. We are planning on releasing version 1.2 before the end of the year.
     
  3. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Well id definitely appreciate a quick integration although im looking forwards to 1.2

    Puppetmaster doesnt require a kinematic character, its more the system itself can be kinematic, in that it can be disabled, kinematic so it registers collisions and fully active where the ragdoll is fully set

    I think puppetmaster should indeed sit on top of the existing system so you can choose when to change the strengths by which the motions are followed by the ragdoll, but short-term, partels method works but currently only for regular movement as far as i can test it.

    If it helps, and i dont know mecanim inside out so i may need correcting, but when the puppet behaviour nodes are in your animation graph and the character is set up as a puppet, activities other than change speed all seem to execute sequentially or get stuck rather than all blending, so im guessing it might be the way the animation controllers are wired

    By sequentially, an example: if you walk, or sprint if you want, everything is fine. If you press the jump key the character will wait until it has stopped moving, then it will jump. I wish i knew more of mecanim to help
     
  4. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Thanks for the info. When I play with PuppetMaster in depth I should have a better idea on how to do the integration - Partel knows his stuff and the FinalIK integration was painless so I'm hoping the same will be true for PuppetMaster. I'll let you know!
     
  5. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    @lazygunn - I have been working on the PuppetMaster integration and have it working better. PuppetMaster can now react while abilities are active. Here's a screenshot of the pilot hitting his head while jumping:

    PuppetMaster.PNG

    In this particular case the character does not go into full ragdoll mode. I had to make a base Third Person Controller change so I'll release this integration with version 1.2. Things are looking good for a 1.2 release at the end of the week.
     
    lazygunn and TonyLi like this.
  6. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I love that, almost perfect example of how puppetmaster can augment regular animation. Now ive got a week to get an environment for it!
     
    opsive likes this.
  7. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Questions:

    Looking at the third person controller clean scene, the mouse wheel does not change weapons, the tab brings up the weapon wheel but clicking on it does nothing, and when I enter the pool from the side the character only treads water (with footstep sounds no less), and the wasd keys stop working. (Entering the pool from the ends of the pool, he swims correctly.)

    On animations, I would like to swap some out, but from other posts I am getting the impression that this could be complicated. Can't I just swap animations of the same name? What is the procedure?

    Using Unity 5.3.0f4 & Windows 7
     
  8. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Hi wood it is very easy to swap animations just replace animation clip in the animator. But there are exceptions, the aim animation has to be configured, it takes few second to do just follow the steps in documentation.
     
  9. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Thanks redjon29,

    Good to hear. Have a Happy New Year! ;)
     
    redjon29 likes this.
  10. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    I will be uploading an updated demo very shortly. Version 1.2 is making its way onto the Asset Store and all of these things have been fixed.The mouse scroll wheel was just an option that was not enabled within the clean scene:

    InventoryHandler.PNG

    Thanks @redjon29! Most of the animations can be swapped out within the animator controller like normal. Like @redjon29 mentioned, there are some clips which use animation events so you'll need to make sure you include those as well. The most common ones are the item aim and use animations. The only other trick is to make sure you replace the animation within all of the layers - the lower and upper body layers in most cases.
     
  11. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Thanks opsive,

    I love new versions. :D
     
    opsive likes this.
  12. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    Cool !! amazing support Justin. Just a little request. Is that possible to have all abilities and features activated in one of the demo scene ( clean scene) ? Think some of the features were spread over multiple scene. If it's too late not a big problem, just a nice to have ;-)
     
    Nateply likes this.
  13. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Damage Visualization and Generic are only the two abilities that are not added within the clean scene. In version 1.2 we added the Push ability was was previously left out. In terms of features, do you mean adding all of the various items? There are a lot of items so I think the biggest issue would be determining where to place them all :)
     
  14. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    loll...too many options !! :) which is good though !
     
  15. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    The update is live. Going download now!
     
  16. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Version 1.2 has been sent to opsive.com purchases and release on the Asset Store. You can see the full release notes here. The visual highlights of this release include:

    Generic Model Support
    generic.png

    Item Holstering

    holster.png

    Balance Ability

    balance.png

    Hang Ability

    Hang.png

    Short Climb Ability

    ShortClimb.png
     
    Gametyme likes this.
  17. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    This version also adds the following integrations:

    Cinema Director
    CinemaDirectorSample.png

    Inventory Pro

    InventoryProSample.png

    PuppetMaster
    PuppetMasterSample.png

    You were ahead of me @Gametyme :) All of the demo scenes have been updated to the latest (@wood333)
     
  18. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    For mobile input, did you forget to add the touch pad to the right side of the clean scene?
     
  19. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    I did - it's a quick change though. Open the adventure scene and then copy the Canvas/Mobile Controls/Camera Move GameObject. Now go to the clean scene and delete the Canvas/Mobile Controls/Camera Joystick and paste the copied GameObject. Make sure the pasted Camera Move GameObject is under Canvas/Mobile Controls and you should be good to go.
     
  20. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Ok, thanks.
     
  21. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    So I'm thinking of buying this, I just have some questions. How is the camera, can I adjust the view to whatever I want. Like over the shoulder, full 3d back view. I see it has over the shoulder but I want to be sure.

    Also, does it have like jump then hang on ledge?
     
  22. opsive

    opsive

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

    Yes, you can specify an offset to any desired angle.

    Yes, this was added in the 1.2 update that went out a couple of days ago. If you take a look at this post you'll see the Hang ability - this ability was started by first jumping and it detecting that there is an object that the character can hang from.
     
    Last edited: Jan 4, 2016
  23. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    I'm trying to integrate Control Freak with the Top Down view. Just can't figure out how to make the right stick to work in that Top Down view but working fine with 3rd Person View though. I assigned the Mouse X - Mouse Y to the right stick but it not working that way I guess. Any clue ?

    Thx
     
  24. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Do you by chance have a controller connected to your computer? Since the character rotation in top down mode isn't directly controlled by the camera it goes through a different set of logic than the third person view. If a controller is connected then it is going to try to use that for input.

    Edit: I think that i know what the problem is. I changed the way this works in version 1.2 and forgot to update a piece within the Control Freak integration. Go ahead and try the new set Control Freak files on the Integrations page.
     
    Last edited: Jan 4, 2016
  25. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    Alright cool. One more thing, I don't want mouse controls. Can I change the camera to WASD.
     
  26. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    If you aren't using any of the input integrations then the Third Person Controller uses Unity's Input Manager for all of its controls. You could map the camera input names to the WASD keys which would allow you to use WASD for the camera.
     
  27. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Can we get some more info on the quick movement ability? I have quick stop working but it also plays when a quick turn should play. Also, there is a quick turn left and right but only one state for quick turn in the animation controller.
     
    Last edited: Jan 4, 2016
  28. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    I have no controllers connected on my Mac. I tried running it from my iPad with same result. My version of Control Freak integration was downloaded yesterday. If you say a new version is ON I'll give it a try. I imagine it should not be too complicated to have the Top Down character to face direction pointed by the right virtual stick of Control Freak.

    Thx
     
  29. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    The Quick Movement ability works by detecting when there is no longer any movement input (RigidbodyCharacterController.InputVector is zero). If this value is zero for more than the Quick Turn Wait duration then it will play the Quick Stop animation. If within this duration the character changes directions by more than the Quick Turn Angle then it will play the Quick Turn animation. It sounds like you need to bump up the Quick Turn Wait value.

    The Quick Movements ability has three states:

    QuickMovement.PNG

    The Quick Turn is setup similarly to the Jump where it will use the movement cycle parameters to determine which leg to place in front. This allows for your left leg to be doing the turning if it is in front, and visa-versa.

    Try downloading the Control Freak integration again and see if that works - I needed to override a method to indicate that it should not be using the mouse.
     
  30. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Ill check again when I get home but last night all I could find was a state for quick stop and a state for quick turn.
     
  31. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Make sure you are looking at the Adventure animator controller. This is the only controller that has all of the Quick Movement states
     
  32. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    I guess that explains it. I was looking at the shooter.
     
  33. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    Hi, after using the character builder with my character, i added the camera scripts and my character can move but the camera skips when moving. This doesn't happen with the Dom character.
     
  34. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Can you explain more by skips when moving? Make sure your main camera only has one instance of the CameraController, CameraHandler, and CameraMonitor components.
     
  35. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    Movement isn't smooth. Laggy movement. Camera only has 1 instance of those scripts.
     
  36. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Can you run the profiler to see what the game is spending most of its time in? What does your scene look like? Are you starting with just a plane to test it out or did you add it to an existing scene? Is it laggy when the character is still and you pan the camera? Have you tested the adventure scene to see if that works as the clean scene does?
     
  37. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    I'm starting on a plane. The FPS is 2.3 which i think is causing it. The model is low poly. It's laggy when the camera is still.

    I think it's the controller handler. When I unclick the handlers the FPS goes up.
     
  38. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    2.3 FPS would cause it. What does the profiler say is taking so much time? Are you logging any output? Logging something every frame is a guaranteed way to kill the framerate.
     
  39. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    How do I use the profiler. I just clicked stats to see the FPS
     
  40. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    Take a look at this video. Alternatively if you send me your project I should be able to see what's causing the problem pretty quickly.
     
  41. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    I'll send you my project.
     
  42. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    It worked with the new CF integration file. Thanks for that great support...as usually ;-)
     
    opsive likes this.
  43. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    I didn't get the slow framerate but I did get some errors/warnings which could cause it. If you look at Eden's AnimatorController you'll see the following:

    Eden.PNG

    The EdenController isn't setup to work with the Third Person Controller and there is no Avatar. Did you setup Eden as a generic model? Make sure Eden is set to Humandoid within the model import settings:

    EdenImport.PNG

    Once you do this and go through the Character Builder again you should be good to go.
     
  44. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    Okay so I got it working thank you. How do I add my own animations. I changed it in the animator but the character goes through the floor. I'm guessing that's an issue with the animation itself.

    Also how do I make her run. Is there a special key.
     
  45. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,135
    You can change the animations by following Unity's guide on updating the animator controller:

    https://unity3d.com/learn/tutorials/modules/beginner/animation/animator-controller

    Parts 1-3, 5, and 6 are relevant

    You'll need to add the SpeedChange ability. Take a look at this video:

    http://opsive.com/assets/ThirdPersonController/videos.php?id=6
     
  46. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    Ok so I've added the SpeedChaneg ability, thanx. I added the Run with button up and button down. However when running forward, she can't turn up left but can turn up right.
     
  47. TheLetterS

    TheLetterS

    Joined:
    Jan 22, 2013
    Posts:
    31
    Which movement type are you using? I would first double check in the animator that the blend tree has all of the run turn states. If the right side is working then the left may be missing and you can add it back. Hope that helps!
     
  48. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    I'm using adventure movement type. I've checked the blend tree states but everything seems good. Character just can't turn up left when running but up right is fine.
     
  49. TheLetterS

    TheLetterS

    Joined:
    Jan 22, 2013
    Posts:
    31
    In adventure mode the run turn is not used since the camera always follows the character whichever direction they go. Is the run turn what you are referring to? The combat movement type uses run turn / walk turn.
     
  50. Porto881

    Porto881

    Joined:
    Jul 11, 2013
    Posts:
    74
    Upon updating to the new version my character gets stuck in some weird sitting/falling pose after jumping.

    Changing scenes in Adventure creator still doesn´t work with the new version. Did you fix this in this version? Maybe I´m doing something wrong.
     
Thread Status:
Not open for further replies.