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

Controller Third Person Templates by Invector

Discussion in 'Tools In Progress' started by Invector, Aug 20, 2015.

  1. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Ah, thank you.
     
  2. devstudent14

    devstudent14

    Joined:
    Feb 18, 2014
    Posts:
    133
    Just purchased the third person combat controller. Left click to attack doesn't seem to work. Have I missed something? Also, I want the ability to dodge attacks (not just roll forward). Can this be done with this controller?

    Thanks! :)
     
  3. snackzilla

    snackzilla

    Joined:
    Aug 17, 2014
    Posts:
    91
    You probably haven't added the Melee Manager onto your character yet. You'll know when you do, as it adds the default hitboxes to your characters hands and feet for unarmed attacks. No weapons = no attacks. And search up earlier in the forums for my video. I made a Zelda-style jump when locked on. Jump left, right, and backward. With this controller, it's all about the animations. Really, you just need to set up a separate State that initiates when you're locked on that controls your jumping (or dodging, in this case) movement.
     
  4. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Our new video tutorial about NPC's will be veeery fancy





     
  5. devstudent14

    devstudent14

    Joined:
    Feb 18, 2014
    Posts:
    133
    Thanks for the response. I was just using the demo scene though. The melee manager is attached.
     
  6. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Take a look into your animator controller and see if the attack states have the vMeleeAttackControl attached, sometimes when re-importing a project into another version of Unity, there is a bug that remove behaviours from states.

    It should look like this:

     
  7. The-Sovereign

    The-Sovereign

    Joined:
    Jul 15, 2015
    Posts:
    24
    I'm also testing your controller with Adam, and it's working great, now I have a question, is it easy to implement canvas text to show the health/stamina percentages?
    In the pics, the sliders show the respective elements, but I cannot get the text to work as intended.
    Sin título-1.png Sin título-2.png
     
  8. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    That's pretty straight forward if you now what you are doing. What have you tried? If you made some changes to the code or made your own share it here and we can better tell you. If you haven't, I suspect this will require a small bit of code.

    edit:
    Here is a quick code that normalizes health and stamina (which means full health =1, half health = 0.5, and no health = 0.0) which is perfect for sliders and if you want a numeric display, just multiply it by 100. Attach it to anything with "vThirdPersonController" and edit it to display on your GUI instead of as a debug and it will do what you want.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using Invector.CharacterController;
    4.  
    5. public class mipHeathMonitor : MonoBehaviour {
    6.     public vThirdPersonController myC;
    7.     public float healthPer;
    8.     public float stamPer;
    9.  
    10.     // Use this for initialization
    11.     void Start () {
    12.         myC = GetComponent<vThirdPersonController>();
    13.     }
    14.    
    15.     // Update is called once per frame
    16.     void Update () {
    17.         healthPer = myC.currentHealth / myC.maxHealth;
    18.         stamPer = myC.currentStamina / myC.maxStamina;
    19.         Debug.Log("health %: " + healthPer + " stamina %: " + stamPer);
    20.     }
    21. }
    22.  
     
    Last edited: Nov 3, 2016
    Invector and The-Sovereign like this.
  9. The-Sovereign

    The-Sovereign

    Joined:
    Jul 15, 2015
    Posts:
    24
    Thanks, it works as intended.


    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using UnityEngine.UI;
    5. using Invector.CharacterController;
    6.  
    7. public class StatusMonitor : MonoBehaviour {
    8.     public vThirdPersonController myC;
    9.     public float healthPer;
    10.     public float stamPer;
    11.     public Text healthText;
    12.     public Text staminaText;
    13.  
    14.     // Use this for initialization
    15.  
    16.     void Start () {
    17.         myC = GetComponent<vThirdPersonController>();
    18.     }
    19.  
    20.     // Update is called once per frame
    21.  
    22.     void Update () {
    23.        
    24.         healthPer = myC.currentHealth;
    25.         stamPer = myC.currentStamina;
    26.  
    27.         //Canvas Text
    28.  
    29.         healthText.text = healthPer.ToString ("0");
    30.         staminaText.text = stamPer.ToString ("0");
    31.  
    32.         //With percent sign, %
    33.  
    34.         /*
    35.         healthText.text = healthPer.ToString ("0") + "%";
    36.         staminaText.text = stamPer.ToString ("0") + "%";
    37.         */
    38.  
    39.     }
    40. }
    41.  
     
  10. nproject

    nproject

    Joined:
    Jan 16, 2015
    Posts:
    68
    Hi,

    Any news about shooter template?
     
    Kory-therapy likes this.
  11. _legolas_

    _legolas_

    Joined:
    Nov 10, 2014
    Posts:
    12
    I just bought the asset. I want the character interact with water like swimming or floating.
     
  12. The-Sovereign

    The-Sovereign

    Joined:
    Jul 15, 2015
    Posts:
    24
    I have done this by adding a new action, it is easy with the tutorial in YT. In my case, the player drift in areas with zero gravity.
     
  13. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    With the 2.0 beta I am getting an error on my Mac that isn't there on my PC. Line 329 (ish) of vThirdPersonMotor:
    vInput.instance.GamepadVibration(0.25f);
    Here is the error:

    .
    I blocked out that line and it didn't cause any problems doing so.

    Thanks!
     
  14. Robiwan

    Robiwan

    Joined:
    Dec 29, 2013
    Posts:
    92
    Hi. Just bought your asset and loving it so far. I noticed that there is a demo scene called beat'em up, and was mainly the reason I bought your asset. Just wondering if it's possible to have the player and enemies only facing x(positive and negative) axis? Basically like all old school beat'em games do?
     
  15. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    So I still don't see this update in the Asset store. Can I get it directly from you guys????

    Just got it from you guys. Thanks again :)
     
    Last edited: Nov 7, 2016
  16. LudiKha

    LudiKha

    Joined:
    Feb 15, 2014
    Posts:
    140
    Can I too please get it directly? :) Cheers
     
  17. The-Sovereign

    The-Sovereign

    Joined:
    Jul 15, 2015
    Posts:
    24
    Quoting Invector in their forum: "Guys the asset store is just taking too long, this is disrespectful with you guys
    Just send me your INVOICE number BY EMAIL: inv3ctor@gmail.com and I will provide a download link for the 2.0 for you all."
     
    LudiKha likes this.
  18. LudiKha

    LudiKha

    Joined:
    Feb 15, 2014
    Posts:
    140
    Thanks!
     
  19. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Sorry about the delay guys, but I'm receiving too many emails and it's getting hard to answer everyone and still be able to work.:oops:

    So I will ask for your understand and patience, I already send a email to the AssetStore support asking why is taking so long to approve, hopefully they will approve soon.
     
  20. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
  21. ebizcraftsman

    ebizcraftsman

    Joined:
    Dec 10, 2015
    Posts:
    20
    Alexarah, abatcat and wood333 like this.
  22. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    I don't see why not, you just need to create a bridge between Player & AI to apply damage to both
    nothing too complicated really, just take a look at our takedamage methods
     
    Alexarah likes this.
  23. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We're creating a series of detail tutorials full with information for you guys :D









     
    Last edited: Nov 12, 2016
    OG_Jacob and drewradley like this.
  24. xxhaissamxx

    xxhaissamxx

    Joined:
    Jan 12, 2015
    Posts:
    134
    still wait ranged :/ i think i will die before see it
     
  25. valakot

    valakot

    Joined:
    Oct 7, 2015
    Posts:
    15
    Does version 2.0 include Diablo style top down combat which was promised?
     
  26. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We just released a huge update with several improvements and dispite the fact that we did make a prototype of the 'diablo combat', it was just a prototype and to polish and make it a real tool it would require some time, time that for now we're focus on developing the Shooter Template.

    But basically you just need to modify the "Click and Move" logic, today we have a layer to detect what you're clicking and make the character move, basically you just need to add another layer, as combat layer and create a distanceToAttack float, if you're close enough and click on the target you perform an attack instead of walk.
     
  27. aibolit

    aibolit

    Joined:
    May 30, 2014
    Posts:
    2
    Hello guys. Could u give me hint - is this asset any diiferent from the one by opsive? I'm to buy third person controller and trying to figure this out which one is better if u need swimming and climbing walls
     
  28. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Opsive's controller has shooting and cover but lacks some of the nicer melee features of this one. If you want one that focuses on movement more than combat, check this one out: https://www.assetstore.unity3d.com/en/#!/content/3853
    A lot more climbing options and things like wall running are included that I haven't noticed in the other two. But it has very limited combat options.
     
    aibolit likes this.
  29. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
  30. Alexarah

    Alexarah

    Joined:
    May 1, 2014
    Posts:
    110
    Hey Invector is it possible to implement Melee Template with an MMO solution on the Asset Store like Photon or maybe just a basic online multiplayer? I'm also curious if it's possible to implement split screen in case of I want to have split screen multiplayer as an option. Don't worry I don't plan on making a multiplayer game starting off. :p So I'm just curious as to if Melee Template is capable of multiplayer regardless of it being split screen or online.
     
  31. FOXNYX

    FOXNYX

    Joined:
    Mar 7, 2016
    Posts:
    2
    Good evening,
    Is it compatible with the MCS Character Asset?
     
  32. The-Sovereign

    The-Sovereign

    Joined:
    Jul 15, 2015
    Posts:
    24
    Yeah, it is.

    PS: Everybody must run away from Character System.
     
    Alexarah likes this.
  33. TheEndersWAR

    TheEndersWAR

    Joined:
    Jan 8, 2015
    Posts:
    58
    I keep getting this error no matter what i do.. could someone lead me the right way on fixing this?
    Assets/Standard Assets/Invector-3rdPersonController/Scripts/MeleeCombat/vMeleeManager1.cs(504,14): error CS0101: The namespace `global::' already contains a definition for `HitEffect'
     
  34. Kory-therapy

    Kory-therapy

    Joined:
    Jun 5, 2013
    Posts:
    56
    What happen to 3rd person shooter kit will it be release in 2016?


    thanks in advance
     

    Attached Files:

  35. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    There is no official multiplayer support but there is several users already creating their own multiplayer, coop and mmo with photon and unet :)

    Hmmm are you importin on a existing project? it seens to be a conflict with another script.
    I just search for HitEffect on the vMeleeManager here and we don't even have this variable there

    We're working on at ;)
     
    Kory-therapy and Alexarah like this.
  36. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Guys the AI still make rolls, we just forgot to remove one condition

    go to your v_AIMotor, method CheckChanceToRoll and in this condition:
    if (inAttack || actions || agressiveAtFirstSight) return false;

    remove the agressiveAtFirstSight from the condition
     
    Alexarah likes this.
  37. Alexarah

    Alexarah

    Joined:
    May 1, 2014
    Posts:
    110
     
  38. angel_cuban

    angel_cuban

    Joined:
    Mar 10, 2015
    Posts:
    4
    Hello, Great kit! I would also like to know if the kit supports locking the camera and characters on one axis to simulate an old school beat em up combat.
     
  39. zelgo

    zelgo

    Joined:
    Jun 26, 2016
    Posts:
    39
    in Jump() and Roll() the condition checks are using magic numbers instead of getting the value from the variables. line 80 and 99 in vThirdPersonController.cs

    also jumping forward is a little weird. is there a way to use the characters forward momentum instead of a set amount each time?

    and if I could make a suggestion, trying to sprint while crouching does nothing; you have to tell your character to stand up and then sprint. it's not very responsive/fluid. it should check to see if you are able to stand up and do it automatically. imo controls should be as smooth and responsive as possible
     
    Last edited: Nov 13, 2016
    OG_Jacob likes this.
  40. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We made some changes and improvements on the jump and locomotion physics, it should be way more smoothier now

     
    Alexarah and zelgo like this.
  41. fluidImages

    fluidImages

    Joined:
    Sep 27, 2013
    Posts:
    29
    Invector,

    My AI seems to just float and not move.

    I know this is likely user error, but can you point me in the correction direction?

    Sean
     
  42. fluidImages

    fluidImages

    Joined:
    Sep 27, 2013
    Posts:
    29
    Interesting - its the capsule solider - if I make the values:
    Center 0m0m0 and Radius 1 andHeight 0 (y) he walks - but he does not collide with anything.

    Any ideas?

    Sean
     
  43. Gherid_lacksGPS

    Gherid_lacksGPS

    Joined:
    Dec 3, 2011
    Posts:
    111
    Been following this asset for a while. Excellent contribution to the community, looking forward to seeing the shooter goodness. Have just a few questions and was wondering if you could speak on them a bit..

    I've heard there are some issues with MCS integration, particularly issues with bones / mesh deformation when ragdoll initiates. Any insights? How has this controller handled out of the box character customization systems, such as MCS, ubrin, UMA?

    Also, are there plans to introduce a more robust platforming system? Ledge hang, climbing, etc I noticed in the demos that inputs are sometimes ignored when multiple actions are desired in succession - jump, roll, jump jump. Perhaps implementing a "buffer" system, similar to fighters, would be a subtle feature to smooth things out.. If an input is declared during a specified frame range of the current action / animation, then the following animation will will still be called upon and executed. Just a thought.

    Again, great stuff.
     
  44. ShahanButt

    ShahanButt

    Joined:
    Oct 29, 2015
    Posts:
    2
    The crouch button on the mobile input does not work. When I play the game on mobile and run the demo scene by the name of "3rdPersonController-Mobile" the crouch does not do any thing. How can i Make it work?
     
  45. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hmmm I change quite a lot of small things in different scripts, it's painfull to do the upgrade in either way :confused:
    Still didn't find a good practice to update scripts, unfortunately

    Check your ground Layer and setup the capsule collider to a appropriate size to your character.

    I never tested MCS character, but UMA DK works perfectly and Ricardo (the creator of uma) is always in touch with us showing his integrations and it's honestly a awesome work! take a further look here:
    http://invector.proboards.com/thread/130/dk-uma-integration-invector-combat

    It's working just fine here, boh editor or in my android device... here is how my crouch button is setup:

     
  46. adx7

    adx7

    Joined:
    Nov 15, 2016
    Posts:
    3
    Hello !
    Please make a video on how to set up swimming (third person controller - melee combat template)
    Lesson is very useful to many people :)
     
  47. ShahanButt

    ShahanButt

    Joined:
    Oct 29, 2015
    Posts:
    2
    I am having trouble changing the lock on target for player. I removed all the enemies from the game. I Added 2 boxes , how can i make my player look at both of them one by one when i press the lock on target button?
     
  48. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    Dear Invector,

    I just purchased your template. While trying to get things up and running Im having trouble with the mouse pointer. Right now if I hit ESC the mouse cursor shows, but it stays on indefinitely and there is no way to get rid of it again. I need it to toggle with ESC. Also when clicking through the Inventory system the mouse cursor (pointer) seems to randomly pop up and also there is no way to hide it again. Is there an easy way to set this up already? Maybe toggle control in input manager?

    The Main Problem with this behaviour is it badly screws up the Players reaction to the Movement and Melee Inputs. That turns out to be absolutely Game-breaking as it provides from Progressing from enemy to enemy, especially the harder bosses.

    Currently I am building for the web player/WebGL and here also the Mouse pointer gets visible (outside of the embedded web Player on the html Page ) as you turn around with the Player Character without the Possibility to hide it again.

    As this Problem is with a fresh install of the template, other Users should be able to verify this behavior. Am I missing out something and there is an easy way to set this up already?

    I am hoping for a quick Fix or a simple solution.
    Thanks a lot!
     
  49. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We do have plans to add swimming in the future, maybe as an optional extension

    I answer your email ShahanButt, btw guys there is no need to send us email, post on the forums and send private messages all at the same time, I always look at these together.

    This is very simple to fix, take a look at our demo scene and you will see that the ItemManager has a option for Events, we even have a method on the Controller that LockInput, you can create another method to show/hide cursor and call this event just like we did with the LockInput :)
     
  50. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Have you tried building it and playing the build? I find the editor causes unstable mouse behavior along with a whole plethora of other things that seem to go away in a build.