Search Unity

Controller Third Person Templates by Invector

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

  1. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hey guys!

    We're on the 24hours sale [finally!] today, let your friends know :D

     
    Malbers and SingularitySystems like this.
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Plugin sounds awesome! Hadn't heard of this until today. The reason we might not want it vs Opsive's similarly named "Third Person Controller" though is that this doesn't sound like it includes multi-player support. Is that true?
     
  3. SingularitySystems

    SingularitySystems

    Joined:
    Feb 10, 2014
    Posts:
    48
    I've been on a Jam team that tested both against each other while evaluating our options for controllers, Invector's was easier to modify and use, but didn't have as many raw features (At the time). Ospive's was a more Complete package at the time, but we found it more difficult to modify which for me as a programmer was a deal breaker.

    One of my goals has been to review the big set of controllers for folks, but the money to buy those licenses is expensive. I may have to get on that at some point, maybe contact the asset makers to see if they want to be reviewed.
     
    jerotas likes this.
  4. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We're focusing on one thing at the time to keep the quality :p, first the Basic Locomotion, then the Melee Combat and now the Shooter, it's very possible that MP will be next! :rolleyes::D (although we didn't get many requests for this)
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Cool. One thing you may want to do (f you're not already), now that you'll have a ton of new users with this sale, is to have users vote on what items from the roadmap should come first. Do you have a roadmap?

    -B
     
  6. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Just picked this up and am trying to spawn the player in the scene and getting the following error:
    I imagine it has something to do with something in the start or awake that isn't registering, but since I haven't dug too far into this yet, a little help would be appreciated.

    Also, when I have a project with this in it, Unity crashes every single time I try to exit Unity. I'm using version 5.3.4p6

    Thanks! Looking forward to messing around with this. Looks great!
     
  7. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Amazing, thank you!
     
  8. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Will shooter be part of Melee pack or will it be another pack to buy more expensive ?
    It is nto possible to have a all in one package ? Melee and shooting for complete TPS Games ?
     
    montyfi likes this.
  9. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We just finish the roadmap of the Melee Combat, and we will start a new one with the Shooter, we're always listening users here :)

    Features you guys can expect on the Shooter:

    - Raycast or Instantiate Projectile for weapons
    - Weapon creator window
    - Scope view & Zoom in like MGS V (similar to First Person view)
    - Lots of customization range, dispersion (for shotgun), particles, frequency, recoil, etc.
    - IK manager for each weapon, save settings in real time (you can use 1 animations with different weapons, and adjust the position/rotation of the hands)
    - HUD Simple Inventory for management and equip weapons

    I just took a quick look and it seens to be a issue with our GameController Spawning method, I will check this and get back to you with a quickfix!

    We don't want to make a potato salad, and it's nice to create options for customers. for example if you want to try out the Basic Locomotion and like it, you can upgrade to the Melee Combat for just $10, but sometimes all you need for your project is the Basic ;) or sometimes you want exactly what the Melee has to offer to create a medieval or hack'n slash game, no fire weapons at all. The Shooter will have the Melee features as well, there is really no point for us to cut features.
     
    drewradley likes this.
  10. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Thanks! And the crash on exit - Any thoughts on that? I upgraded to Unity 5.3.5 and it still crashes on exit every single time and only with this project.
     
  11. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Great that you keep things simple.
    So this means if we buy the melee pack we must pay 10$ to get the Shooter pack ?
    Or will it be only two packs : locomoation and melee plus shooter included ? In that case the name should change and should not be melee only name.
     
  12. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hmm we never experience any crash, and nobody has report too... Perhaps some bug on your Unity?
    there was one time that a user report errors about windows, it turns out that we need to reset his Unity layout to default.

    Spawn Quickfix:

    Open your GameController script and modify the Start and the Spawn method:
    Code (CSharp):
    1. void Start()
    2.         {
    3.             var characterController = FindObjectOfType<vThirdPersonMotor>();
    4.             if (characterController != null)
    5.             {
    6.                 currentPlayer = characterController.gameObject;
    7.                 return;
    8.             }        
    9.  
    10.             if (currentPlayer == null && playerPrefab != null && spawnPoint != null)
    11.                 Spawn(spawnPoint);        
    12.         }
    13.  
    14.         public void Spawn(Transform _spawnPoint)
    15.         {
    16.             if (playerPrefab != null)
    17.             {
    18.                 var oldPlayer = currentPlayer;
    19.                 currentPlayer = Instantiate(playerPrefab, spawnPoint.position, spawnPoint.rotation) as GameObject;
    20.  
    21.                 if (oldPlayer != null && destroyBodyAfterDead)
    22.                     Destroy(oldPlayer);
    23.                 else if(oldPlayer != null)
    24.                 {
    25.                     var comps = oldPlayer.GetComponents<MonoBehaviour>();
    26.                     foreach (Component comp in comps) Destroy(comp);
    27.                     var coll = oldPlayer.GetComponent<Collider>();
    28.                     if (coll != null) Destroy(coll);
    29.                     var rigdbody = oldPlayer.GetComponent<Rigidbody>();
    30.                     if (rigdbody != null) Destroy(rigdbody);
    31.                     var animator = oldPlayer.GetComponent<Animator>();
    32.                     if (animator != null) Destroy(animator);
    33.                 }
    34.             }
    35.         }
    Open your ThirdPersonMotor script, when the variable combatID is created change to:
    Code (CSharp):
    1. protected CombatID combatID = new CombatID();
    Open the vFootStepTrigger and on the OnTriggerEnter method, add this line at first:
    Code (CSharp):
    1. if (_fT == null) return;
    I will publish this quickfix on a update along with the camera quickfix that @Shadex has report.

    We don't have the final price yet, but the upgrade will be very accessable.
    The shooter will be a new asset with option to upgrade just like we annouce when we first release the Basic (page1)
     
    Last edited: Jun 15, 2016
    zenGarden likes this.
  13. TechSins

    TechSins

    Joined:
    Feb 16, 2015
    Posts:
    142
    What is left to be done in the shooter pack? and any info/pics/videos you can show us?
     
  14. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hold your horses, we just started :p
     
    Hamesh81 likes this.
  15. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I just updated to a new version and don't have this problem with any of my other projects. I tried running in various compatibility modes and run as administrator and no luck. I guess it's more annoying than anything (at least I hope there are not other issues). Perhaps I should uninstall Unity and start over.
    Thanks! Quickfix works.
     
    Invector likes this.
  16. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    Oh my there was a sale :D couldnt keep my hands off from clicking Purchase :D Let's see what I can make with this kit :)
    and of course +1 for shooter template :D
     
    Invector likes this.
  17. jgiroux

    jgiroux

    Joined:
    Jul 21, 2015
    Posts:
    22
    well sadly, I did everything mentioned. and its still not working. I don't believe this to be an issue with the asset package to anyone reading, so I want to make sure that's understood. However I am hoping I can find out whats wrong.

    so I did a test, with my project. created a new scene.

    made a terrain.
    put down (1) ClimbUp prefab
    (1) StepUp prefab
    (1) JumpOver prefab

    I created a new character controller, chose your high poly invector model, hit accept.

    I dragged a prefab AI #1 enemy, placed it..

    didn't touch anything or alter any settings.

    hit bake mesh (I noticed that terrain and the cubes are set to "static", generate ofsset navmesh is checked.

    bake the terrain, hit play.

    enemy follows me over JumpOver obstacle but nowhere else. anywhere else I go CLimbUp, StepUp they just stop, they continue to head track me but otherwise don't move unless I jump down at which point they start following.

    im using 5.3.5f1 version unity. version1c of this template.

    I am using some other things, but nothing that I would think would have messed with anything on this asset (mostly animations at this point)

    im going to try just a new fresh project and see if the issue remains:

    timelapse:
    ok, new project, import asset. nothing else/
    repeat steps above.

    get same results, enemyAI only follows through jump overs. but not climbups or stepups.

    this is with version 5.3.5f1 unity.
    can someone else confirm/deny that this also happens to them on a fresh install?
     
  18. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    @jgiroux Oh.. you just need to adjust the Navigation options. The default settings are to small and it wont bake any navmesh into the climb or step up.





    This information is available on our documentation, we even put some values that handles well with our actions objects ;)

     
  19. jgiroux

    jgiroux

    Joined:
    Jul 21, 2015
    Posts:
    22
    edit: Fixed issue.

    under Bake settings, the default values screw everything up for the navmesh. for example mine was set to Drop Height = 0
    Jump Distance= 0, etc... I took notes for the settings in your area noticing right away that you had a drop height of 4.1 and a jump distance of 3 along with many other settings that were not the same. So I set my area as the same settings for baking as your area, and now everything is working as intended.

    S.w.e.e.t.

    Thanks so much for everyone trying to assist, I knew it wasn't the asset buts some bonehead thing I was doing.

    anyone else running into the issue I suspect should look into this as well.
     
  20. jgiroux

    jgiroux

    Joined:
    Jul 21, 2015
    Posts:
    22
    wow., you totally beat me to it...lol.
    and here I thought I was going to tell you something you didn't know.

    awesome support.!!

    edit: to be honest, your template has been so user friendly and easy to handle, that I hadn't had to look at your documentation ...well...pretty much ever. Its just that well commented and built.
    my bad. apologies for taking your time to answer a silly question that could have been avoided.
     
  21. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Well, it miraculously stopped crashing on exit. Instead of exiting, I simply switched to a different project and that worked. Now I am able to exit without crashing. Go figure.
     
  22. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    hehe no worries! now go and have fun with the bots :D

    Unity works in mysterious way sometimes :p - glad to know that it's working now
     
  23. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    yep they will be in a better position that is my demo testing stuff map, in the real version they will be in a better spot, and I want the player to crouch on this trap, there will be jump traps. basically want the player to figure it out. I will post an updated full map soon :) then get them skeletons in there so he can punch stuff.
     
    Invector likes this.
  24. xxhaissamxx

    xxhaissamxx

    Joined:
    Jan 12, 2015
    Posts:
    134
    finally i can't wait :3
     
    Invector likes this.
  25. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    yeah it looks promising, if it is as easy it set up as the RPG melee one will be awesome to use
     
    Malbers and Invector like this.
  26. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Ops, I missed your post on the last page - sorry about that :oops:
    I guess he add the direction value into a new animation state with the new evade animations



    To create a fly controller it's like I say before, you will need a new blend of animations and a new method of FlyMovement, just like we have StrafeMovement and FreeMovement
     
    magique likes this.
  27. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @Invector
    It is easy to customize AI melee combat ?
    For example i need some ennemy to randomly wait or move from player before ocming back attacking.


    Will the plugin get ledges grabing like this kit ?
     
    Last edited: Jun 6, 2016
    Josalv, Invector and xxhaissamxx like this.
  28. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Considering that AI is not the focus of our asset, we have some pretty good settings for you guys to play with, I think you can do this behaviour by messing with the Min/Max time to attack, and by turning on every strafe option, he will strafe backwards while not attacking.



    Pretty cool kit, it's a total potato salad lol, but it has some cool stuff!
    We're pretty sure that we finnally found our animation guy, and this means a lot of new cool features :rolleyes:
    Including a climbing system.
     
    Hamesh81, Shadex, kurotatsu and 3 others like this.
  29. SingularitySystems

    SingularitySystems

    Joined:
    Feb 10, 2014
    Posts:
    48
    Exciting stuff! Grats on the new hire!
     
    Malbers likes this.
  30. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I agree perhaps it is too much, non organized and not usefull for some game types.
    Anyways there only some ideas if you would want to extend the package in some way.

    That's pretty complete and already complete to make thousand of different behaviours.
     
  31. PeterShoferistov

    PeterShoferistov

    Joined:
    Sep 22, 2013
    Posts:
    59
    Hi. Did your controller allows to add such stuff as a wall jumping, wall sliding, double jumping etc? Thanks!
     
  32. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    Holly Wow ! we need something like this for Unity ...or just move to UE4 lolll
     
  33. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Is there a way to cycle through selected targets? Sometimes it locks on to a target I don't want.
     
  34. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Are you saying that a character can fight like beat em up and even shoot projectiles like third person shooters??.....if I get it right then i don't have to write extra scripts full of crap !!!!....cause my game is heavy on melee combat but also have some projectile shooting system (not bullets)....like Sleeping dogs (this one below).....oh just thank you man...can't wait (still have lot of work in flying system, so i can wait :D)-
     
    Josalv likes this.
  35. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Well, i forgot about gamepad, but you can switch by pressing X and Z on keyboard.
     
  36. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Thanks!
     
  37. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Nope, but you will have a pretty good start to make those features, it's actually not hard to do if you have the animations, just create some triggers and bools to activate them.

    Use the Left analogue left and right to switch on the gamepad and Z or X on the keyboard.

    That's right, melee and fire weapons on the same package :p
     
    xxhaissamxx and Vibhanshu like this.
  38. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    Planning to have a topdown shooting mode as well ??
     
  39. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hell yeah, just like Alien Swarm :cool:
     
  40. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    FYI: when I set up my own player following the tutorials, I ended up with a player that was always crouching and randomly flying away. Seems that the "Create new character" only sets the layer on the root and the children were still on the default layer so it considered its own ragdoll colliders to be obstructions. Easy to fix by simply resetting the layer and telling it to set it for the children too, but I had to figure that out myself and didn't see it mentioned anywhere. Perhaps I over looked it. Is the character set up supposed to change the layer for all the bones or just to the root? And are there any bones that SHOULDN'T be set to the Player layer?
     
    Invector likes this.
  41. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Thanks for reporting that @drewradley, this happens because before on 1.3 you need to manually assign the layer Player to the character, as show on previous tutorials and documentation, but now it's set up automatically when you create a new character. We will change to add the layer to the childrens bones too on the next update.

    One thing that you guys need to pay attention is to not forget to assign the layer "Ignore Raycast" on the Weapons.
    Otherwise he can auto-crouch or don't collide properly.
     
    drewradley likes this.
  42. Bdase

    Bdase

    Joined:
    May 25, 2016
    Posts:
    3
    I think i got two weird bugs:

    First one: When you create a prefab from a configured character AI, it not work! When you drop it into scene again i get the errors:
    Code (CSharp):
    1. UnassignedReferenceException: The variable top of vMeleeWeapon has not been assigned.
    2. You probably need to assign the top variable of the vMeleeWeapon script in the inspector.
    3. UnityEngine.Component.GetComponent[vHitBox] () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineComponentBindings.gen.cs:48)
    4. vMeleeWeapon.Init () (at Assets/Invector-3rdPersonController/Scripts/MeleeCombat/vMeleeWeapon.cs:97)
    5. vMeleeManager.InitDefaultMeleeWeapon () (at Assets/Invector-3rdPersonController/Scripts/MeleeCombat/vMeleeManager.cs:63)
    6. vMeleeManager.Start () (at Assets/Invector-3rdPersonController/Scripts/MeleeCombat/vMeleeManager.cs:55)
    7.  
    8. and
    9.  
    10. NullReferenceException: Object reference not set to an instance of an object
    11. Invector.v_AIAnimator.DEF_Animation () (at Assets/Invector-3rdPersonController/Scripts/CharacterAI/v_AIAnimator.cs:302)
    12. Invector.v_AIAnimator.UpdateAnimator (Single _speed, Single _direction) (at Assets/Invector-3rdPersonController/Scripts/CharacterAI/v_AIAnimator.cs:44)
    13. Invector.v_AIController.ControlLocomotion () (at Assets/Invector-3rdPersonController/Scripts/CharacterAI/v_AIController.cs:102)
    14. Invector.v_AIController.Update () (at Assets/Invector-3rdPersonController/Scripts/CharacterAI/v_AIController.cs:17)
    And i get how to fix it, the script vmelee manager create clones of hitbox(2-3 clones), if i delete all of them and let the script create only one it works!!


    The second bug i can not find a fix: After some time i get the error when i try to create a new enemy ai:

    Code (CSharp):
    1. UnityException: The Scene View can't be access
    2. vCreateCharacterEditor.Create () (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:218)
    3. vCreateCharacterEditor.OnGUI () (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:143)
    4. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    And the script only create a clone of the original prefab: vBot@lowpoly(Clone). Without scripts, without hitboxes. :(
     
  43. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    How would I set it up to start with a weapon? I tried just putting a weapon on the weapon handler but it didn't recognize that it had one.
     
  44. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    This will happen to the character, AI or Companion and the fix is very simple:
    UnityException: The Scene View can't be access
    You need to have the scene view window open to create the characters :p

    Perhaps you forget to create a handler for this weapon, and the melee manager is not finding.
    Try following our tutorial:

     
    Bdase likes this.
  45. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I'm using the weapons in the kit. Realized it was supposed to work when I saw you had demos that the player starts with a weapon - but even those default to punching instead of sword attacks. I've made a few minor edits so it's probably something I did. Mostly I just added a few null checks. I'll go back through and remove my edits until I find the culprit.
     
  46. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    This is the culprit! I reimported all the scripts that had been edited and started to make the changes and check and it stopped working after I added this line. Perhaps I put it in the wrong place? I put it right after " meleeManager = GetComponent<vMeleeManager>();" which is line 275 for me.
     
  47. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Oh right, indeed this will not work!
    remove this line from the Start and place it when the variable is created as:
    protected CombatID combatID = new CombatID();
     
  48. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Thanks! That did the trick.

    My next thing is to add weapons via an inventory system. I've got it so the weapon gets put on the handler easily enough, and I just call " InitCustomMeleeWeapon();" on the MeleeManager script when a weapon gets placed directly on the handler at runtime. It seems to work fine, but I just want to check with you to make sure there won't be other issues or I'm not missing something else that needs to be initialized. Thanks!

    edit: oh, and I had to turn off all the colliders first otherwise it makes the player fly back really quickly. It looks like they get turned back on when in use, but, again I just want to make sure I'm not messing things up by doing this.
     
  49. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We did not try any inventory yet, but take a look at the vCollectableMelee script to see the behaviour of equip/unequip
     
    drewradley likes this.
  50. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Well that's cool...and different too....but i've one query...if my character is brawling....how could it switch to shooting mode?....i mean is this update is like standard third person action games where a player will keep punching until it's weapon is drawn out and then it'll enter the shooting mode?...or are you trying something different with these behaviors and controls?...i've one request friend....please keep melee combat prior. Melee combat is the hardest thing (i think) to get working......and it's something i'd searched for years and found it only in your package after purchasing lots of buggy, full of fake description assets...
     
    Pregga and Invector like this.