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. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Hey my great buddy Invector !!!, I'm back, but now i'd solved all of my jittering and lagging issues i reported you some days ago. But I did nothing...:p...it's your update that solved my issues instantly. Soon i'll show you my project i'v been working since 4 years !!!!
     
  2. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Nice!! - can wait to see :D
     
  3. juicycleff

    juicycleff

    Joined:
    Jul 2, 2015
    Posts:
    4
     
  4. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Can you help me a little?.....Everything seems to be perfect in my 3D beat em up (hand-to-hand) scene....but there are some issues where the AI enemy does not react to hits (especially kick animations)....I think it is being caused by legs hitboxes.......can you show me how to properly adjust hitboxes on legs for kicking animations........???.....I'm working on a fast-paced beat em up like arkham city (except counter-attacking, that's the hardest part i think :D )...please help
     
  5. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Make sure that on your Animation State, it has the right hitbox from select:

     
    Vibhanshu likes this.
  6. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    C'mon guys, I wan to see more 3rd Person games on that list!!! Enough of First Person, 2D and RTS games :p

     
  7. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    I think most of the people consider FPS as the best genre......but i really don't like controlling just a gun.!!!:D

    And I'd checked everything.......It's an animation like this... it need both legs as hitboxes so selected Both Legs........all of my attacks are working as expected except this one......do you think it's a matter of configuring hitboxes of legs??
     

    Attached Files:

    Last edited: Jun 1, 2016
  8. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Maybe the hitbox is not reaching the target, try make the attack using slowmotion to see better.
    The player has a variable call Time Scale on the Inspector that you can tune
     
  9. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    Having a few problems with the Camera during lock-on. When i fight the goblin (first guy in the video) the camera rotates extreamly fast around him. I set the Right parameter to .5 so it has an over the shoulder view when in the lock-on state. Ideally i would like the camera, during the lock-on state, to stay behind the player and limit the rotation (so it doesn't do the 360). I tried "Limit Angle X" with 0/0 and -45/80, etc and that has not worked. How do i stop the infinite rotation?

    Question 2. When i fight the Giant, and lock-on to him, the camera basically goes into the ground, and the camera is looking straight up. Ideally i would like to either have the camera pull back and up so that you can see most of the player and the giant, or have the camera to look at a normal height (basically the giants legs). I have tried limiting angles X and Y, I tried lowering the sprite height in the lock-on script, and various offsets. So far nothing has worked. Below is the video


    Any help would be appreciated.
     
  10. snackzilla

    snackzilla

    Joined:
    Aug 17, 2014
    Posts:
    91

    Are you using custom combat animations? I had some camera issues with mine, as some of my custom animations were much quicker than the ones this system was designed around. I don't know if it'll fix your issue, but it looks like your goblin and your player are using the same Animator. Try switching the goblin it to the default Invector AI animator, with the default animations, (just for a test) and see if this fixes your issue, as it looks like the camera is trying to keep up with the animation. Also check your layers and raycasts. It looks like the enemy is passing through the player, causing it to register as "behind" the player, which the camera would have to rotate a full 360 degrees to compensate for. Again, one of my own custom animations a while back was causing my enemy to go through my player, so the camera acted wonky. I hope this helps.
     
  11. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    I just get dizzy doing this test lol - very interesting, we didn't noticed that but it's totally related on the distance, the target is too close and the camera too far. If you put a lower value on the Distance, like 1.5 instead of 3, it will stop. I will take a look here to see what we can do to improve this, thanks for reporting!

    The second issue is because the lock-on will lock on the middle of the gameobject, I guess we can make a target for each object and pass this information to the lock-on, this way you can set up different height for different targets.
     
  12. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    Setting the camera to 1 on the strafe did fix it mostly, however it still does the rotation once in a while, when the goblin gets to close. I was looking for a way to limit the goblins min attack distance, however i don't think that's a great solution as the animation itself could be moving the goblin to close. The other thing is i did up the goblins attack rate and attack time quite a bit, which means he keeps moving closer to the player through the animations, causing the spin.

    As for the Giant and the target/offset, that would be really appreciated. Again, thank you so much!
     
  13. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    They are using different animators. The Layers should be correct. I've checked them a dozen times, and 2 our of the 3 animations are the default animations, just speed up slightly. Thank you for the heads up though.
     
  14. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    @Shadex I did a quickfix but for some reason I can't initiate a private conversation with you, can you please contact us by chat or email?
     
  15. SingularitySystems

    SingularitySystems

    Joined:
    Feb 10, 2014
    Posts:
    48
    Ah Good, I haven't lost any respect by working on a 3D Isometric game. =P.

    In all seriousness, until I have a better budget for models, I had to put my own third person work on hold. I'm a good programmer, but I can't model anything but low poly. Maybe if I find a better job with commensurate pay I could kick something towards a modeler... (C#/Unity Dev Looking for work! PST ; D). Maybe next project if this one pans out and is commercially viable.

    Definitely looking forward to the shooter template though. I'm still here rooting for ya!
     
    Invector likes this.
  16. ScaraBe

    ScaraBe

    Joined:
    Oct 7, 2015
    Posts:
    43
    Just wanted to say that I'm having lot of fun with AICompanion, it's so fun that I spend more time looking it than coding :p. I'm sometime surprised by its behaviour with mutiple enemies, like if I was playing with a human, incredible :eek:.

    Can we add random idle anim. variation to AI like the 3rdPC script ?:rolleyes:
     
    Last edited: Jun 2, 2016
    Invector likes this.
  17. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    I'd checked the hitboxes and they're easily reaching the AI....also there are no problem with other kicking animation...... that's not a serious issue but i've some cool melee combos and they'll look incomplete without the last animation...... Thanks for your help
     
  18. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hi Invector,
    Look interesting template, I have a question can I use it to build something like these:


    where if you notice:
    1- if there is two much enemies around you they are not attacking you all at once however maybe a couple only attach ans the rest is in waiting state till things are ok to fight? is there such a controller in the kit?
    2- Regarding the melee combat system can we achieve something like the above video where the fight is very smooth and with fast move? and can we have combo's?
    3- Regarding the Bosses is there something like Boss editors that we can use to define different attacks / moves for the boss (boss fighting strategy) during the progress of the battle?

    Thanks.
     
    PIGame likes this.
  19. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    If you could tweak some stuff and settings of controller and animator....i'm sure you can develop your project like the one you showed... Cause i also created a fast paced beat em up with this controller... Invector is just awesome, they just didn't developed a controller, they developed a complete framework for any action game.
     
  20. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    That's awesome to hear :D
    Since they use the same animator as base, you just need to copy the methods and variables that manage the RandomIdle from the player to the AI, very simple :)

    If you like I could take a look on your project and see whats wrong, or just send the animation to us... see what's better for you :)

    I think that you will have a great start to make a game just like the t. ninjas example, about the melee you just need faster and smoothier animations, combo's work too.

    This template was always design to be a ThirdPersonController, we just get a little excited on the AI :p, but it's not the main focus here - It's very customizable on many things like moveset, frequency of attack, defense, waypoints, etc... It has some limitations but the point is that you have a great kickstart to work it out the rest and make your game, all the scripts is open to modifications :)
     
    Vibhanshu likes this.
  21. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Thanks for the answer, in this case is there any integration with other kits as well?

    EX: AI, or to drive a car (Car kits), or fly ...etc?
     
  22. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Would a gif work?....or should i send you the FBX file?.....also, sorry for my bad grammar ....and i want to ask you one thing more...Your lock-on is perfect.....but instead of pressing a key, i want it to enable itself when an enemy is near or in a certain range from player character.....like most of the action games......and can i switch the lock-on between targets(enemies)?
     
  23. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    You're not focusing on integrations yet (only after a stable release of the Shooter Template), but there is several assets that work perfectly well such as FinalIK, Horse Pack from @Malbers, PlyGame, and several others that users have being reporting lately.

    Hmm a gif it's not enough, try record a video showing your hitbox settings, animator & gameplay, and send to us at inv3ctor@gmail.com. No worries about your grammar, I can totally understand you (and it's not like mine is a example of grammer lol).

    You can switch between target using the left analog on the gamepad, and Z or X on the keyboard ;)
     
    Malbers likes this.
  24. ScaraBe

    ScaraBe

    Joined:
    Oct 7, 2015
    Posts:
    43
    Ok, thank you, I got it for AI idle variation ;), Where can we get our companion currentstamina parameter? I only find maxstamina & staminarecovery, I would like to display it .
     
  25. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Usually AI doesn't use stamina (I think I never see o_O) - but if you want to add, just follow the process that the player does, it shouldn't be hard.
     
  26. Invector

    Invector

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

    v1.3c is avalable! and you know the drill - always backup your project

    here is the changelog:

     
    Last edited: Jun 3, 2016
    LudiKha and PIGame like this.
  27. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    The best asset's support is here!! Thank you .....will send the files soon....currently messing with dialogue system for unity.....
     
    Last edited: Jun 3, 2016
  28. wetfiregames

    wetfiregames

    Joined:
    Nov 17, 2012
    Posts:
    28
    Awesome update!

    Multiplayer or multiplier? o_O
    Add:
    - Damage Multiplayer option on the Melee Attack Behaviour (Animation State)
     
  29. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    oooooooooopsss, multiplier :oops: :D
     
    PIGame likes this.
  30. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    In the example Mod's I made and posted earlier, I have a sub boss that drops a Main boss spawner on death, and the main boss sends a message of bossKilled to player on death for points and to complete the level.

    A lot of this has to do with duplicating the animator controller, and putting it on different enemy types with animations for that specific enemy.

    I'll try to post a video sometime this next week.
     
  31. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    Looks like a great asset!
    I have three questions
    1) Will it officially support plygame?
    2) Can it be used with top-down camera or am I stuck with the 3rd person camera?
    3) Does the basic locomotion asset, contain this "slider under" animation that is contained in the melee combat package?


    Thanks for advance.
     
  32. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    1 - Yep! we will focus on integrations after a stable release of the Shooter
    2 - Yep! try the webplayer, it has several examples of camera like 2.5D, topdown, isometric, etc..
    3 - slider under? o_O
     
  33. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    Thank you for your reply!
    Sorry, if I was not clear. :D
    It is the animation at 3:27 where the player escapes the zombie jump.
     
  34. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Oh it's just a roll animation, it comes with the basic locomotion template too :p
     
    Stranger-Games likes this.
  35. abatcat

    abatcat

    Joined:
    Feb 8, 2015
    Posts:
    70
    Lots of good ideas for developing melee combat
     
    ScaraBe and Invector like this.
  36. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    I've actually pulled something similar off with this system.
    1. The AI has a "First Attack Delay" and "Min Time to Attack" as Parameters that you can change in the inspector. It's really easy to get what your going for if you set First Attack Delay to 1-3 and Min time to Attack to about 1/4th of the number of enemys you have. IE 10 enemies, set it to 2.5. You can also simply setup their block or roll chances to a higher percent. I'm working on a fantasy game and have tried this setting with about 20 goblins. Keep in mind the enemy's need to finish their animations, so it's much easier for them to look like their fighting if you dodge their attack's, without having to many guy's hitting you at once.

    2. This is pretty easy. Double the speed of the animations and uncheck "Use Turn on Spot Animations". Then the rest is up to how smooth the animations are. Maximo has a ton of free animations that are easy to make look smooth. You may have to do a few blend states for something like jump attack's (if you don't want root motion on them) and you most likely will want to add additional controls, but alot of that can be done through mechanim easily, and the stuff that you need to add new buttons for, they have tutorials on how to do that.

    3. This one is slightly harder. You can give boss's their own animation controller so that you can customize their movement. Their is the right way and the easy way to accomplish differn't attacks. The right way is to assign a parameter inside mechanim like health, and set up attack sets based on the health. Assign faster and better combo's the lower the health goes to give the feeling of the boss being more dangerious at lower health. You can do this with a ton of differn't things. The easy way is to set the block or roll animation to a special attack animation, such as leaping back and breathing fire. I have an ogre that steps back and preforms a jump attack. The also made it really easy to use their system with another AI system like Rain. Their is a script you can attach that will do damage and everything. This is how i plan to give my non-humanoids AI. Honestly, i know the Invector guy's say their AI isn't the main focus, but their AI is pretty sick. It's pretty lightweight, and you can do a lot with it. It took me a week to get in 10 differn't enemy's setup, with pathing and a decent attack system. I've put in around 30 enemy's setup with pathing, and 5 differn't full sets of movement animations and attack animations in less then a day.
     
  37. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    Will the shooter template be using raycasts or projectiles (objects with physic's like an arrow) or both? Will their be AoE colliders for things like grenades or explody fireballs of doom?
     
  38. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Both :cool:
    AoE? - what does it stand for?
     
  39. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    I absolute love the way that Ninja Theory works, and I have being follow the dev diary since the very beggining and loving the updates. I remember when they first announce the gameplay and nobody like the combat lol, and now we can see how they improved and it looks awesome!

    You guys know that you can reproduce some of those combat movements right? You just need good animations, for example syinc a left attack to trigger the desire hit animation :p - you can also create new evade moves like @snackzilla did with his awesome project! (btw we would love to see more)
     
  40. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Evade move?....how?.....can you please explain?.....I'd changed the roll's animation to an evade animation...but don't know how to add extra abilities......cause i want to fly my character.....so I created a custom controller that disables the rigidbody's gravity and moves my character in air ....... Can i achieve something like this with your controller?....cause i've to disable your controller everytime when my character is flying ......and thus i've to move your scripts to Standard Assets folder (I don't know how to code in C#:p).....Also..There are some of combat moves that're stronger and more damaging..so i want to trigger the reaction hard state for them....is it possible?
     
    Last edited: Jun 5, 2016
  41. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123


    Thanks Invector, check out the progress in that temple will have skeletons as AI, your tutorials are super helpful, I will be a repeat costumer for sure for the shooter plugin when am ready for a new project

    fyi I know the map is junk but now almost everything is in place to make the full game.
     
    Last edited: Jun 6, 2016
    Malbers and Invector like this.
  42. SingularitySystems

    SingularitySystems

    Joined:
    Feb 10, 2014
    Posts:
    48
    Hey Draken Knight, just a designer thought from my end. You've got those spinning blades at a position where it's ambiguous to me as an observer whether or not I should crouch, or jump over. (And they intersect the player's head), you may want to move them up slightly, and place an obstruction over them to keep players from attempting to jump over them. Otherwise, looks promising!
     
  43. jgiroux

    jgiroux

    Joined:
    Jul 21, 2015
    Posts:
    22
    Is there any tutorials or anyone able to assist with setting up AI enemy to pursue the player over things like the ClimbUp prefabs and StepUp prefab.

    if I create a enemyAI using the tools, then drag and drop any of these prefabs (climbUp stepup etc) they don't pursue me but rather they just stay at the base. maybe losing sight of me or not being able to access the action animator?
    things I have tried and didn't work.

    1) baked the area several times , made the object default baked, made the object StepUp and ClimpUp in navigation, and baked. still didn't work.

    2) raised and lowered the detect ray for action, tried both thinking maybe it wasn't hitting the collider, but still didn't work.

    3) set it to AUTO action, didn't work for enemies but worked for player, however I didn't want auto action, so unchecked it again since it didn't work with enemies anyways,

    4) raised the ClimbUp object high enough so it didn't create a non walkable area on navigation mesh, then lowered it down...
    tried it with navigation mesh set so it did create the cutout.

    Is there something that I am missing somehow? I looked at the demo provided but couldn't find any difference between your enemy setups and mine.

    even tried copying an enemy and a ClimbUp object from your demo scene to mine and your enemies also stopped pursuing me across these objects.

    NOTES about my setup.
    I don't have waypoints setup at the moment....do I need to?? maybe that is my issue?

    oddly, my custom enemies do about 75% of the time activate their JumpOver animations over the JumpOver obstacles....

    I am using a custom terrain so my floorplane isn't always 100% flat, would that cause any issues?

    anyways, hoping maybe someone can offer some suggestions or clues as to what I may be doing wrong.
     
  44. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Have you tried baking the area with OffMesh link unchecked, I'd similar issue where my EnemyAi just keep looking at my player and nothing else......unchecking OffMesh link generation helped me....Also check tags and layer of Player .... And about flat terrains...that won't cause any problem cause i'v 90% sloppy areas on my terrain
     
  45. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    Area of Effect. Like a grenade or fireball, so that on impact they explode and spawn an additional collider to do damage in a wide area. It would be awesome if you had it, because it would basicly be a free aim spell system. Raycast the ground, spawn a lighting bolt particle effect with an large collider for lighting strike. Use a projectile with fireball particle attached that explodes on impact for a traditional fireball spell. Or explosions from missiles and grenades if your making a modern day shooter.
     
  46. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    Are your non moveable objects set to static (like terrain and other objects that will never move)? it's a check box in the upper right of the inspector. I had similar problems when i got the system working on my own terrain, and that is what fixed the lack of chasing and climbing up obstacles.
     
  47. jgiroux

    jgiroux

    Joined:
    Jul 21, 2015
    Posts:
    22
    I will check both solutions when I get home today, one of the best things about this community but also the worse is how fast you all are at answering!!
    lol...

    now I am itching to go home and test these theories (which sound like that may be my issue with off mesh setting and static) but I am stuck at work for 5 more hours!!
    AHHHHHHH!

    seriously though, nowhere else but the Unity community is so fast ad precise in repsonses.
    Thanks Vibhanshu & Shadex for taking a time out to answer my questions.
     
  48. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Sorry if it was asked before, need to make decision while it is on sale, does it work with PuppetMaster?
     
  49. Roughrider

    Roughrider

    Joined:
    Jul 17, 2011
    Posts:
    73
    Any way to get the camera zoomed in to -.1 and change the camera state to first person without it going batsh!t crazy? Basically looking to be able to zoom between first and third person. Ala most mmo controllers.
     
  50. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Considering everything that the guys have told, you can also take a look if your Area Mask is set to do every action:



    I just literally create a new scene, drag the jumpOver prefab and the AI prefab into the scene and bake it, and it's working.
    Let us know if you got it ;)

    Oh right, this is very simple to do just need a range for the explosion.

    We have integration with FinalIK and soon with the PuppetMaster :D

    You could add the Culling Fade and set the character mesh to fade out when you zoom in, this would make the effect!
    But First Person with the mesh visible it's not possible yet, the camera keeps going through the mesh, it's a mess lol