Search Unity

Shooter AI – The Ultimate Artificial Intelligence Solution

Discussion in 'Assets and Asset Store' started by nikita68, Oct 8, 2013.

  1. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Im having 2 issues with some old legacy models (setup for mecanim now) i brought into shooter AI. first IK was all messed up.(My Guess is from weird joint rotations of the models) i played with the ik settings, and rotated the hands a bit and got the default weapon holding looking pretty good, but for some reason the engage holding for the weapon is rotated 90 degrees while he is shooting and rotating the engagement Weapon location does not change it (Transform changes work, but not rotation changes), like it does for the default weapon location. Any ideas ? also im not using the standard gun could the New gun rotation being different ,cause some of the issue ?
    the next issue is the enemy tag keeps resetting after i change it and then hit play.
    Ive been using the standard models til now, so i haven't had to deal with setup before.
    (Note: rotating the gun model fixed my issue but I still think there is an issue with engagement holding position. rotation not being set.)
    thanks
     
    Last edited: Apr 8, 2015
  2. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Ok one other issue im having. AI seem to still being going back to location 0.0.0 at certain times, maybe once all waypoints have been used.(not sure) where in the shooter ai scripts is this location 0.0.0 being referenced? (note: after testing more it goes to 0,0,0. When transitioning from different states. Like after engaging an enemy. Pretty much a game breaker at the moment.)

    And not an issue at the moment but if you have any suggestions. If i set the gun range less than the sight distance, the AI will just sit and watch their target,they wont advance to weapon use range. For now i can set the distances the same so they will either patrol or see enemy and engage. But it would be nice to have them see the enemy and then advance to a closer location so they can shoot.
    (Could this be written in an engagement script ?)
    Thanks
     
    Last edited: Apr 9, 2015
  3. Team_Tino

    Team_Tino

    Joined:
    Dec 13, 2014
    Posts:
    3
    Hi,
    I love your product, but im a little confused and also new to forums. i signed on just to ask this question. I think I'm missing something from the basic setup and ik tutorials because my character does this in his default position , and then when he fires it's from behind him. i only got it to work once but it was with a weird test character i made. please help or point me in the right direction. thanks!
    Screen Shot 2015-04-10 at 3.15.43 AM.png Screen Shot 2015-04-10 at 3.16.27 AM.png
     
  4. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    @Team_Tino
    I noticed for my character that rotation seemed to matter. I make and empty gameobject with correct rotation and attach character to that before i used shooter ai setup. Also make sure all your mecanim setup is correct first. Also in the hierarchy you can go into the bones and you can find default weapon position and move that as need be. Also in the gun, adjust hand positions helped a bunch.
     
  5. Team_Tino

    Team_Tino

    Joined:
    Dec 13, 2014
    Posts:
    3
    Thanks for the advice but its still not working. I'm a little confused about what to do in mecanim cause i don't know too much about it but it almost appears like he would be firing it if the gun didn't set it'self backwards or if he turned around but i used empty game objects and none of that worked. man this is the final key to making my stuff work haha
     
  6. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Version 3 will support 4.6?
     
    Last edited: Apr 11, 2015
  7. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    @Team_Tino
    Rotate the gun model in the hierarchy of the character. And then relocate the hands location >under the gun model. My characters were doing nearly the same thing. That fixed it. Alot of guess and check
     
  8. Jacopo97

    Jacopo97

    Joined:
    Aug 20, 2013
    Posts:
    10
    sorry for my English, but I have a problem ...
    I can not build the game because it gives me this error ...
    Please let if someone could help me!
    I HAVE UNITY 5.0
     

    Attached Files:

    Last edited: Apr 11, 2015
  9. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    First off, sorry for the extremely late replies, next week our exams start.

    @JBR games -
    1) That usually happens when the bones on the mesh itself are incorrectly set. Or, have you checked how the engagement target is set? Maybe it got offset for some reason.
    2) If its a prefab, very important to click apply first! It took my a few days to find this error when SAI first launched, but for some reason Unity has conflicts with serializing the variables.
    3) Thats strange. 2.2.3 is coming out next week, and we have a number of small fixes there. I'll PM you a download link.
    4) That could be written in and engagement script (well, hard coded with Unity 5 :( ). But that should actually be part of the brain logic. I'll look into it.

    Also, thank you for helping out with answers on this forum. :) Anybody that helps out can get any of our assets, by request, for free.

    @Team_Tino -
    As JBR games said, rotation of the character is critical. Look into the rotations of the bones themselves in your modelling program. Unfortunately with procedural animation with complicated humanoid models, a lot of guessing is involved. Thats why in 3.0 we're using animations, with IK filling in the gaps.

    @Pulov - There won't be official support for anything below 5, BUT SAI 3.0 won't have any 5 specific features, so porting it back should be easy.

    @EVERYBODY!
    - Next week 2.2.3 will be out
    - Zombie bug fixed
    - UFPS bug fixed
    - Unity 5 bugs fixed
    - Also, new UFPS tutorial:


    - Multiplayer package (seperate asset) now brings drag-and-drop soldiers to multiplayer games using UFPS Multiplayer! Price will drop to $20 next week!
    https://www.assetstore.unity3d.com/en/#!/content/18542



    @Jacopo97 - Fixed with 2.2.3, coming next week. :)
     
    Jacopo97 likes this.
  10. Jacopo97

    Jacopo97

    Joined:
    Aug 20, 2013
    Posts:
    10
  11. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Hello, I have some question about SAI (I'm using SAI 2.2.2 with UFPS 1.4.9):
    1. On the first tutorial "Unity3D Tutorial | Shooter AI 2.0: Quick Setup", after he added the soldier character, he need to rotate the hands for the IK. But on the later tutorial "Unity3D Tutorial | Shooter Artificial Intelligence: Mixamo", after creating the ragdoll, everything is done (no hand rotation). So my question is which tutorial should I follow?
    2. Have anyone here had trouble with A* navigation? I followed this tutorial "Unity3D Tutorial | Shooter Artificial Intelligence: Navigation (A* and Unity NavMesh)". But when I create a new zombie enemy (model from mixamo), choosing A* for the navigation method. I've also created the _Pathfinder and applied the A* grid. But when I hit Run, the zombie just stand and not chasing me. I'm using a very simple scene just to test (1 Quad, 1 zombie and the player). For now, I need to switch back to NavMesh and it's working fine.
    3. And I'm dying waiting for the new version to fix the zombie bug. :(
     
  12. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @hailegia -

    1) Follow the quick setup tutorial. The mixamo one is just to show which formats are needed for the characters.
    2) Thats very strange. Have you checked that all tags were correctly assigned?
    3) Sent a pm ;)
     
  13. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Actually, the "Tag of player" is set correctly. The "Tag of bullet", I set the value to Untagged because I don't have Bullet tag at this moment. Will this affect the navigation? And by the way, what is the "Tag of bullet" use for? I saw the source code and it doesn't do much. Thanks. :)
     
  14. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @hailegia -

    Tag of bullet adds better hearing if you're using projectiles. Its rare, but as long as it uses some tag, it shouldn't be a problem, and definitely shouldn't affect navigation.

    What could affect navigation, is whether the AI is actually seeing you. You can see this by opening the hierarchy of your AI -> Sensors -> EarsAndEyes -> GatewayGamesEyes & GatewayGamesEars both have parameters showing whether the ai can see/hear the enemy. Try running the game, pausing and seeing whats happening.
     
  15. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Thanks. Nikita. Anyway, I'm busy with the prototype at this moment, so NavMesh is okay for me now. I will switch back to the A* later. Then I'll let you know. Thanks. :)
     
    nikita68 likes this.
  16. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Hi Nikita, I'm trying with the zombie prefab of the new version 2.2.3. But it's still weird. You can take a look at the video:


    There are 2 issues:
    1. What's wrong with the zombie's animation?
    2. The damage method is changed to "Damage" already. But nothing happen to my player.

    Note: the soldier can kill me.
    Thank you.
     
  17. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    ok i got the 2.2.3 and zombie do the damage but the Animation problem is still there as shown in the above video zombies in recent versions are acting real wierd were wrking nice earlier
     
  18. RyanEarpGW

    RyanEarpGW

    Joined:
    Jun 12, 2014
    Posts:
    65
    abhijeet1001 likes this.
  19. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Hi abhijeet1001, can you tell me the steps you did to make zombie to damage the player? Thanks. :)
     
  20. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    just wait abit for 2.2.3 to come out or contact nikita to get the link , got the latest fix n its wrking now ,,

    by the way @Nikita and @Ryan if u guys can make a better tutorial at IK Settings that will be great the tutorial there is pretty hard to understand , please if possible try some model that isnt fixed up properly and fix in video cause i have tried it a couple times but the problem is always there ,

    also need how to make a zombie character ? i can make soldier by > create AI but how can i get zombie to wrk , i tried setting up settings like 0 magazing - ammo in magazing and ticket draw back to melee but it keeps shooting :v
     
  21. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Hi abhijeet1001, I'm using 2.2.3 at this moment. That's why I'm asking. :)
     
  22. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    i had same issues when i first got 2.2.3 , i reported the prob still persists and nikita sent another one again then it was wrking try contacting him , but i would suggest to wait so he can fix the animation bugs with zombie too
     
  23. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Oh yeah, then let's wait. Thanks. :)
     
  24. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Okay, I have another question. I have bought a soldier model that already have many animations (with weapon). Can I use that animation with shooter ai? It's so hard to configure the IK with the model I have. Thanks.
     
  25. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    watch this video to use ur custom animations


    by the way i have a doubt @nikita68 and @RyanEarpGW is it possible to use complete set of custom animations including idle , shoot , attack , so it eleminates the problem cause by ik ? so i dont have to rely on holding positions just use the animations directly , in zombie prefab i think its done the same ? u just added invisible weapon and added custom animations for attack ( melee ) and idle and etc so just wanted to know if i can do same in soldier too
     
  26. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    also pleae have the look at the video :
    , this has happened quite alot of times zombie prefab coils up like a snake and starts spinning like a spinning top

    usually when it gets hit that happens , in this m showing by some grenades but that has happened when shooting with a gun too
     
  27. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Thank you abhijeet1001. I will try the custom animation. And the issue with your zombies, it happened to me too.
     

    Attached Files:

  28. Nomad5oul

    Nomad5oul

    Joined:
    Aug 18, 2012
    Posts:
    24
    What day is SAI v2.2.3 and the new SAI Multiplayer assets being released on the store? I just checked but still v2.2.2 and Multiplayer version is from last year :(

    Also I have some questions about the AI:

    1. How do I change how aggressive the AI is?
    2. How do I change the AI rate of fire e.g. for pistols or machine guns?
    3. How do I change how much damage the AI does to the player?
     
  29. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    Look this photo.
    The AI shoot me, but the shot goes the other way
    Do you know how to solve this
     

    Attached Files:

  30. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    Hey hi mate , it sometimes takes abit of time for unity to review and approve the asset so just sit tight n 2.2.3 shuld b up soon

    answers of ur question

    1) try tweaking your AI's emotion data
    2) and 3) open ur AI in ur hierarchy click on your weapon , in editor under Gateway Games component you can find all the things like recoil , ammo , damage done , times between each shot ( fire rate )

    hope this helps
     
  31. Jacopo97

    Jacopo97

    Joined:
    Aug 20, 2013
    Posts:
    10
    Hello everyone, you know the precise day when released version 2.2.3 of unity?
     
  32. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    Hello jacopo as stated above , shooter ai 2.23 is already submitted on unity asset store now its upon unity team when they review and approve it
     
  33. Nomad5oul

    Nomad5oul

    Joined:
    Aug 18, 2012
    Posts:
    24
    @abhijeet1001 - Thanks for the help.

    So I just checked and v2.2.3 of SAI Multiplayer is up but SAI Standalone is still v2.2.2 on the store :(
     
  34. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Sorry, I just look through the thread but didn't find how to pause all the AI? I'm implementing the pause menu for my game right now so I need a Agood way to pause all the AI. Anyone know how to achieve this? Thanks.
     
  35. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    m not sure the correct way , but why not just make a tag called Enemies and put that tag on all your enemies and then using a script do, when the pause menu is opened , find all the objects with tag "Enemy" and disable the objects

    or just set the AI speed = 0 and can engage boolean to false using ur script - ( i think this is more better option )
     
  36. Jacopo97

    Jacopo97

    Joined:
    Aug 20, 2013
    Posts:
    10
    Hello everyone, how can I fix this error without waiting for version 2.2.3?
     
  37. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Yeah, I think that is a good solution. And do you know how to reset the AI state? I'm trying to use the AI with vp_PoolManager (UFPS). The only issue is I don't know how to set the AI back to the initial state before putting it back to the pool.
     
  38. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Hi, I think that is because you are using Unity 5. Just disable that line and everything would be okay.
     
  39. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    if u havent got it sorted yet then open the script called GatewayGamesBrain.cs
    and remove line 1211 of GatewayGamesBrain.cs.
     
  40. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    seems u want to spawn enemies randomly ? using ufps pool manager ? why not just use Shooter AI's ( GenericSpawnManager.cs script ? )
     
  41. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    The issue is GenericSpawnManager is not using any object pool. It will instantiate prefab every time it need. I want to reuse dead enemies and spawn them again. :)
     
  42. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    ok i get it you dont want to instantiate and destroy , instead just reuse the AI , and thus u needed to reset the AI ok cool ,

    then when your AI dies ,and you have respawned them just do this on them isdead = false and set the health value of them back to max that shuld do the trick ,,
     
  43. hailegia

    hailegia

    Joined:
    Mar 15, 2015
    Posts:
    25
    Hmm, I don't think it's that easy. If you look at GatewayGamesHealthManager class, Die method. you'll see that it will destroy all brain's components and children. I don't know if it has some other cleaning code also.
     
  44. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    well may b u can try this ?
    modify your GatewayGamesHealthManager.cs script
    in the Die() function instead of destroying everything ( which u dont want )
    just copy the KnockedDown function and paste in Die() function

    also in the Die function at last you can add the AI back to pool and respawn it somewhere else so once its AIStandupaftertime is done it will stand and start walking or just edit the last line and make your own new AIStandupFromFakeDeath ( dam long name lol ) and set ur own time or settings etc

    hope it helps :)
     
  45. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    @nikita68 and @RyanEarpGW by the way i wanted to know if SAI 3 comes with some goodies for zombies AI ? or just new stuff been added to soldiers :rolleyes: , cause so far in the lil peaks we had in above shared vids n demos were of soldier AI no zombies :(
     
  46. silvansly

    silvansly

    Joined:
    Oct 24, 2013
    Posts:
    6
    Does Shooter AI work with UFPS integration if I buy it right now? - Using Unity 5 Pro.
     
  47. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    Yea it does :) it works out of the box with UFPS , watch the tutorials
    . shooter ai is fully compatible with UFPS latest versions and unity 5 pro/personal so u shuldnt be wasting any time and grab it as soon as posb , cause soon Gateway games gonna release SAI 3 with many more features ,and price might go up , and if you buy it now you can upgrade to SAI 3 later on for free
     
    Last edited: Apr 22, 2015
  48. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Good afternoon. There is a support or not ?? Asset bought , but no one answered my question = (((
     
  49. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    As noted a little earlier in the thread, the devs are busy taking a set of high level exams at the moment and won't be available for a while.

    When they return they'll be working on a new release of Shooter AI that will enhance performance and resolve some of the bugs that exist in the current version.

    Can you repeat your question here on the forum? Maybe one of the people who use Shooter AI has a solution for you.
     
  50. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Hello, I am having an error after installation. How to fix them ? And for how to set up after the AFPS Multieplayer ???
    1) Активы / Shooter AI / редактор / Brain / GatewayGamesBrainEditor.cs (125,79): ошибка CS1502: лучший перегруженный метод подходит для `UnityEditor.EditorGUILayout.Slider (строка, плавать, плавать, плавать, Титулы UnityEngine.GUILayoutOption [] ) 'имеет некоторые неверные аргументы
    2)
    Активы / Shooter AI / редактор / Brain / GatewayGamesBrainEditor.cs (125,79): ошибка CS1503: Аргумент `# 2" не может преобразовать объект `'выражение типа` поплавок "
    3) Активы / Shooter AI / редактор / Brain / GatewayGamesBrainEditor.cs (125119): ошибка CS1061: Тип `GatewayGames.ShooterAI.GatewayGamesBrain" не содержит определения для `chanceOfEngagement» и ни один метод расширение `chanceOfEngagement" типа `GatewayGames. ShooterAI.GatewayGamesBrain "может быть найден (вы пропали без вести с помощью директивы или ссылка на сборку?)