Search Unity

Controller Third Person Templates by Invector

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

  1. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Enemy need to check if player "is stealth" everytime they detect player.
     
    Gojira96 likes this.
  2. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    The way I plan to add stealth is to set up a bool similar to the"bool CheckTargetIsAlive()" in v_AIController and make it "CheckTargetIsStealth()" every time it checks if alive. Hope that helps!
     
    Gojira96 likes this.
  3. carlosrovira

    carlosrovira

    Joined:
    Dec 23, 2014
    Posts:
    58
    Thanks @Invector that sounds very good. The good thing is AC has been designed to be extensible, support other assets and substitute parts for other, so I think this will be a very good marriage between those both amazing assets that will benefit everyone! :)
     
    Alverik likes this.
  4. Arekon

    Arekon

    Joined:
    Jul 12, 2016
    Posts:
    2
    Now it comes up. :) But yes, I tried Chrome and Firefox. Opened up on Chrome this time.
     
  5. retired

    retired

    Joined:
    Jan 13, 2015
    Posts:
    42
    Thanks a ton Drew, this helped tremendously! I was wondering is there a way to automatically go back to idle when you unequip weapons, I am using ORK as well. Currently with your script it continues to play the drawn weapon animations when unequipping. Thanks.
     
    Last edited: Jul 13, 2016
  6. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I'm sure there is - I just haven't done it. I set it up in ORK so that the weapons cannot be unequipped. You could try to set up an OnDisable in that script I wrote that calls DropRightWeapon() and DropLeftWeapon() from the weapon controller. You could always create an "unarmed" weapon that the player can equip that will change it back to the default animations.
     
    snackzilla likes this.
  7. snackzilla

    snackzilla

    Joined:
    Aug 17, 2014
    Posts:
    91
    I'm actually using your script from earlier, and an OnDisable didn't work for me. (At least, my baby-coding skills couldn't get it to). But I never actually thought about using a blank weapon purely to change the animation states. Jesus man, you've saved me even more time.
     
  8. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    That was mere speculation and I had no idea if it would work or not. I'll play around with the code and see if I can come up with something.
     
  9. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    And done...

    Add this to my script:

    Code (CSharp):
    1.  void OnDisable()
    2.     {
    3.         myvMeleeManager.currentMeleeWeaponRA = null;
    4.  
    5.         myvMeleeManager.DropRightWeapon();
    6.         myvMeleeManager.InitDefaultMeleeWeapon();
    7.     }
    And it should now go back to the default animation set when you remove a weapon.

    edit: Probably don't need to call DropRightWeapon() since I have blocked that off so players cannot drop a weapon that way and it still works for me.
     
    Last edited: Jul 14, 2016
    snackzilla and Malbers like this.
  10. retired

    retired

    Joined:
    Jan 13, 2015
    Posts:
    42
    Wow! Thank you very much for taking the time to put this together and share it. Much appreciated.
     
    drewradley and Malbers like this.
  11. rbm123

    rbm123

    Joined:
    May 24, 2015
    Posts:
    130
  12. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    Can't wait for that next version. I'm trying to use an animated model from the Unity Asset Store with your project, and it's virtually impossible. The model includes animated skirt and hair, so I can't just use your animations, since they were made without these bones. And when I try to swap in the animations designed for these models, the Y position is slightly different than what you were doing so jumps, landing, etc. is a nightmare.

    I can't edit the animations myself because for some reason the edited model is no longer compatible with the animations designed for the unedited model. Bone layout is exactly the same in the Hierarchy. You can rotate and scale the skirt bones manually and the changes are visible in the 3D view before the animation is applied. I unfolded the Mask in the animation import and made sure every single bone was checked. It just mysteriously doesn't work. So my only remaining option is to make the other asset's animations somehow work with your project. Manually changing things like run speed and jump height would help a LOT.
     
  13. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    The last image has coding :confused: - you can try visual code like PlayMaker or PlyGame, but eventually I think you will need to code some stuff.

    You can send us your model if you like, I can take a look ;)
     
  14. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    With mobile/360 controller support as flagship promotion, I'm afraid to ask, do you have PC centric control?
    Meaning, 3rd person mouselook (ref, Mass Effect 3).
     
  15. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    lol sorry - I really don't undestand your question... what do you mean with "PC centric control" ?
     
    Last edited: Jul 15, 2016
  16. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    What's the best way to make the quick stop animation start a little sooner? As it is now, the player stops, starts to go to idle then the quick stop animation plays so it looks like they are doing a little dance step. I tried playing around with the speed settings on the transition, but I didn't notice a difference.
     
  17. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    You can:
    - decrease the animation transition
    - edit the animation clip to have less frames at the beginning
    - in the QuickStopAnimation method on the ThirdPersonAnimator, decrease the value of -6f to a lower value
    - or simple replace the animation, there is a few good ones at mixamo's ;)
     
  18. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I put it down to -10f and it looks great now. Thanks!
     
    Invector likes this.
  19. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    It's easy to find a character controller that is designed for 360/ps3 controller, controlling the camera with one joystick and the character with the other, camera follows character. It's a bit harder for find one that is designed first for PC mouse/keyboard.

    Specifically, and ideally, it would work like this;
    Rotate both the character and the camera with mouse X, when the character is moving, but not when standing still (with an option setting to include character rotation when standing still as well). (No holding down LMB/RMB to control camera.)
    Incremental turn animation and if the user only slightly moves the mouse, only the head/neck will rotate, if the user moves the mouse over a set distance, the character will rotate to follow the camera direction. Mouse Y is camera look up/down but with character head/neck follow angle to a degree.
    In addition, shift is set as a run modifier, but this is usually not overlooked.

    I tried to set this up myself once (as a test) link, it was far from perfect, but more importantly it takes a lot of time to just set up the basics.
     
  20. PIGame

    PIGame

    Joined:
    May 2, 2016
    Posts:
    32
    hi guys, how r u doing? Thank you Invector for the awesome template XD

     
    Invector and drewradley like this.
  21. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    Hey, nice video! But... ummm, you should probably tone down the color saturation in your scene. Specially the bright greens everywhere... which are usually used to denote a safe or cheerful environment. Seeing the tone of danger in the game (and the dramatic music during battle...) you should probably aim for less saturated colors, or colors like greys, blues, etc, they will give you a more serious mood. just check any war movie for reference. In contrast, bright saturated colors usually look cheerful or even artificial, hence they're best used for cartoony styles. But, if you do want to keep the general feel of the level like that while exploring (because it's the first level or an area supposed to be generally cheerful), I recommend to at least tone down the colors during battle (using color grading at runtime). Because a big deadly battle surrounded by bright cheerful colors feels just weird...

    Well, that's not to say saturation should be avoided entirely. Usually, you use saturation as a contrast, to get the player's attention on an object. People naturally direct their attention to the most saturated or bright object in an image, so it's great way to guide the player to watch what you want them to see.

    Anyway, everything else looks pretty cool, the moves look really nice, keep it up!
     
    PIGame likes this.
  22. PIGame

    PIGame

    Joined:
    May 2, 2016
    Posts:
    32
    Alverik You have a really really valuable comment I appreciate that so much, I've just fired the artist which is me for the mistake and hired me again to fix that :D "tone down the colors in battle" I'll go with this, and thanks for the knowledge about saturation using it's really helpful I do have a lot to learn XD
     
    Alverik likes this.
  23. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    That's awesome! I'm about to start setting up special attack like you have. Any tips?
     
    PIGame and Alverik like this.
  24. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Oh right, we have that it's the strafe mode, rotate's the camera around the character if he is stand idle, and align with the camera if he moves. You can use the controller as free mode + strafe mode to aim, or just the strafe mode (usually for shooters) Try the webplayer :)
     
  25. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    Hey, no sweat, lots of Indie developers (like me) tend to have to do everything themselves, and there always comes a time when we wonder, why won't my level look cooler or higher quality even if I'm using good quality models and materials? Then you'll be forced to research this topics. In most cases recoloring assets to fit a specific color harmony is the way to go, but if you can't, or don't know how to, then color grading can come to your rescue. Anyways, just do tone down the overall grass saturation a bit, it was a bit too brilliant and it can be tiring to the eyes. Anyways, here are some videos and articles, which I consider excellent, and which may interest you:

    Blender Guru: Understanding Color (Video).
    Blender Guru: Understanding Composition (Video).

    Gamasutra: Lessons in Color Theory for Spyro the Dragon (Article).
    Gamasutra: Color in games: An in-depth look at one of game design's most useful tools (Article).
    Color theory for game design 1: fundamentals (Article).
    Color theory for game design 2: Glyphs and neutrals (Article).

    Edit: Also, if you don't know how to use color grading in Unity, you can start with this basic video:
    How to: Color grading in Unity 5.
     
    Last edited: Jul 16, 2016
    Invector and PIGame like this.
  26. PIGame

    PIGame

    Joined:
    May 2, 2016
    Posts:
    32
    Thanks for the videos and Articles, Alverik, you're so kind I'm jumping into them now XD
     
    Alverik likes this.
  27. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    Well, I can't legally distribute it because it's from the Asset Store, but I'll PM you the store information.
     
  28. PIGame

    PIGame

    Joined:
    May 2, 2016
    Posts:
    32
    Warpzone: the 1st skill we do is by swaping the roll animation with an attack animation, then add a damage zone like in the trap script, the other ones are harder and done by the coder so i dont know the detail how he do it but i think he added more anim states and with the animations which has more than 1 attacks (combo anim) u have to split them into smaller ones cos the Melee controller only cause damage 1 time per anim. Wish i knew more to share with u T.T
     
    Last edited: Jul 19, 2016
    Alverik likes this.
  29. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    No problem. I feel confident I can make my own solution. Nonetheless it looks good.
     
    PIGame likes this.
  30. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Ok, nooooooow we have a Forum :D

    We have been testing a Forum System recently, but it was not working out because he had some restrictions and limitations.

    But the new vForum is here and it's open!

    We decide to go for a more tradicional forum template, this one has a lot of options and freedom like:
    post images, videos, scripts, edit posts, send private messages, awesome emoticons, custom avatar, etc...

     
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm trying out the latest version of this, but I'm getting errors when I try to create my own character.

    Code (CSharp):
    1. Unable to locate specified type "MyRewardGiver"
    2.   at Devdog.General.ThirdParty.FullSerializer.fsResult.AssertSuccessWithoutWarnings () [0x0001b] in C:\Wii U Games\SoC-DragonsBane\Assets\Devdog\General\ThirdParty\FullSerializer\Source\fsResult.cs:157
    3.   at Devdog.General.JsonSerializer.DeserializeTo (System.Object& obj, System.Type type, System.String json, System.Collections.Generic.List`1 objectReferences) [0x0001f] in C:\Wii U Games\SoC-DragonsBane\Assets\Devdog\General\Serialization\JsonSerializer.cs:94
    4. UnityEngine.Debug:LogError(Object, Object)
    5. Devdog.General.DevdogLogger:LogError(String, Object) (at Assets/Devdog/General/Misc/DevdogLogger.cs:77)
    6. Devdog.General.DevdogLogger:LogError(String) (at Assets/Devdog/General/Misc/DevdogLogger.cs:70)
    7. Devdog.General.JsonSerializer:DeserializeTo(Object&, Type, String, List`1) (at Assets/Devdog/General/Serialization/JsonSerializer.cs:98)
    8. Devdog.General.JsonSerializer:DeserializeTo(Object, Type, String, List`1) (at Assets/Devdog/General/Serialization/JsonSerializer.cs:82)
    9. Devdog.General.BetterSerializationModel:Load(List`1&, String&, Object) (at Assets/Devdog/General/Serialization/BetterSerializationModel.cs:35)
    10. Devdog.General.BetterScriptableObject:Load() (at Assets/Devdog/General/Serialization/BetterScriptableObject.cs:32)
    11. Devdog.QuestSystemPro.Quest:Load() (at Assets/Devdog/QuestSystemPro/Scripts/Quests/Quest.cs:137)
    12. Devdog.General.BetterScriptableObject:OnAfterDeserialize() (at Assets/Devdog/General/Serialization/BetterScriptableObject.cs:42)
    13. UnityEditor.AssetDatabase:LoadAssetAtPath(String)
    14. vCreateCharacterEditor:LoadAllAssets(String, List`1&) (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:182)
    15. vCreateCharacterEditor:LoadAllAssets(String, List`1&) (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:190)
    16. vCreateCharacterEditor:LoadAllAssets(String, List`1&) (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:190)
    17. vCreateCharacterEditor:LoadAllAssets(String, List`1&) (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:190)
    18. vCreateCharacterEditor:LoadAllAssets(String, List`1&) (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:190)
    19. vCreateCharacterEditor:OnEnable() (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:57)
    20. UnityEditor.EditorWindow:GetWindow()
    21. vCreateCharacterEditor:CreateNewCharacter() (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/vCreateCharacterEditor.cs:51)
    22.  
    I have Quest System Pro installed, but not Inventory Pro. It seems that is thinks I have Inventory Pro installed and wants to do something with it. I am unable to actually create the character due to this error.
     
  32. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hmmm I really don't know @magique, it's hard to tell without seeing the code...
     
  33. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    What do you mean? I was assuming your asset was doing some sort of Inventory Pro Integration and that's why this error comes up. Are you telling me that it doesn't?
     
  34. snackzilla

    snackzilla

    Joined:
    Aug 17, 2014
    Posts:
    91
    Trust me, the Invector Controller 1.3e has absolutely nothing to do with Inventory Pro. I've been trying to get it integrated myself for a long time now. Invector has said after the shooter add-on is released, they'll contact these devs to get some sort of dialogue going for integration. As of right now though, they're totally separate entities. That's not to say that there might not be some sort of conflict with some of the scripts. I've used I.Pro successfully without error, but I'm not sure about Quest System Pro. They're made by the same author (DevDog), so I might would try posting on their thread for Quest System Pro in the forums to see if they could point you in the right direction.
     
  35. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Interesting. There must be a script conflict then.
     
  36. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    My gaming PC blew up, why I have been gone, but.....
    I FINALLY GOT MY SKELETONS
    Here is a choppy video kinda showing it :)


    Oh am testing out female models so the player can choose male or female :)
     
  37. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    It's definitely some conflict with the Quest System, but without looking at it's hard to know what can be...

    Looks very nice, but you really need to work on optimization... it looks like it's running at 3fps o_O
     
  38. Dumad123

    Dumad123

    Joined:
    Aug 22, 2013
    Posts:
    16
    Hey guys,

    Quick question. I tried setting up the camera so it bobs when the character moves through a script. However, it just doesn't seem to bob when I move. Is there a way to work around this?

    Thanks!
     
  39. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    yeah its on a refurbished dell PC with a GT 720 on lowest settings, basically a desktop that can only handle youtube, I plan on getting an upgrade soon but will be a month. But yeah it looks more awesome then this. On my old PC that blew up was a 7770 radeon and it looked stunning and ran like a dream, so am working on getting the proper hardware, really looking at a GTX 960 which all games these days seem to run on. I just need more money's. If you guys have any cheap PC build ideas feel free to link to me, my budget is 400 - 800 US.

    these are the specs I am looking at, let me know your thoughts. This is a very good topic as all games should be benched marked.
    • Intel Skylake Core i5-6600K quad-core processor
      3.50GHz, 6MB L3 Cache (with a Max Turbo Speed of 3.90GHz)
    • 8GB DDR4 system memory (expandable to 32GB)
      Gives you the power to handle most power-hungry applications and tons of multimedia work
    • 1TB SATA hard drive
      Store 666,000 photos, 285,000 songs or 526 hours of HD video and more
    • DVD+/-R/RW + CD-R/RW
      Watch movies and read and write CDs and DVDs in multiple formats
    • 10/100/1000 Gigabit Ethernet
      Connect to a broadband modem with wired Ethernet
    • NVIDIA GTX 960 Graphics with 2GB dedicated graphics memory
     
    Last edited: Jul 25, 2016
  40. bluray467

    bluray467

    Joined:
    May 28, 2015
    Posts:
    15
    will the shooter template be released this year?
     
    jayimagination and Shodan0101 like this.
  41. snackzilla

    snackzilla

    Joined:
    Aug 17, 2014
    Posts:
    91
    Hey man, I just got around to testing this. Just letting you know that It works flawlessly even with totally separate weapon handlers. You should hit up Invector with the complete script so they can add it to the Integration section of the official Invector forum. Thanks again for putting it together. I'll upload a video later this week showing how I've implemented your script.
     
  42. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    You're welcome! I've discussed some of my scripts with Invector and told him he can use anything I post to this thread if he wants to include them in future releases. I suspect he can do a better job than I did though but perhaps it will at least give him an idea of where to begin.
     
  43. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hmmm You may need to implement this script to work together with the 3rd Person Camera script, running on the same update and stuff, otherwise one can override the other.

    Nice machine, it will run great :)

    Absolutely!

    We will change a loooooooooot of stuff on v1.4, and we will include a unexpected surprise for you guys :rolleyes:
    This will suck a little bit for those who has heavly modify the template (very big changes on the main scripts) but it will improve the quality of the template in general, including the way you handle equipments (pickup, equip, drop)
    the announcement will be soon :p
     
    drewradley likes this.
  44. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    There was wondering about 1.4. 1.4 support easy way to change the Pathfinding? .. I want change unity NavMash to A* Pathfinding or APEX AI ...... Easily
     
  45. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We will not work on the AI for a while for now, the priority now is:

    - Basic Locomotion v1.3 (this week, with new demo scene, v-bot 2.0 and new animator controller)
    - Melee Combat v1.4 (with new equip/handle items, new demo scene, v-bot 2.0, new animator controller)
    - Finish the Shooter v1.0 and release it

    We had to go back to the Basic because we have now separated the Template, when you import the MeleCombat or Shooter into a project you will get the Invector's Folder and inside each template separated.

    This means that if you purchase the Shooter template, you will have the exactly same Basic Locomotion and Melee Combat as the one sold separatly. By keeping stuff separate we can have more control and freedom with updates and codes.
     
    TeagansDad and Hamesh81 like this.
  46. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    cool, its on the wish list :)
     
  47. rbm123

    rbm123

    Joined:
    May 24, 2015
    Posts:
    130
    No plan to add Zombie to this package or third person shooter?
     
  48. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    It's pretty easy to do a zombie behaviour with our AI, you just need to replace the model and animations :)
    I did one on the survivor tech demo

     
    Malbers and jayimagination like this.
  49. rbm123

    rbm123

    Joined:
    May 24, 2015
    Posts:
    130
    I'm starter in unity ! if I follow your tutorials about changing animation and models , can I do this?
    can you help me about it a little more?
     
    Last edited: Jul 27, 2016
  50. rbm123

    rbm123

    Joined:
    May 24, 2015
    Posts:
    130
    Finally I get 1.3e and at the first run I have this problem!

    Only |WASD| and |123| works! I cant jump or roll or take anything!