Search Unity

[UPDATED] ICECreatureControl v1.4.0 - creature AI for enemies, animals, monsters, zombies ...

Discussion in 'Assets and Asset Store' started by icetec, Aug 11, 2015.

  1. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    @DougUnit12
    Getting the same with every version of 5.6, minus the "ice_creature_editor_essentials.cs". Is your workaround usable, or does it still require changes from the author?
     
    Last edited: Aug 5, 2017
  2. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Have you checked out my Herd tutorial video?
    I setup flocking behavior using Interactors in that video.
     
    jabevan likes this.
  3. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hello TonanBora, thank you for giving us ton of tips.:)

    Have you ever talking about Coroutine with Pit before?
    As you like mentioned first, I came up disabling UseCoroutine is best idea which we can do with no modificating source codes, for now.

    Conroutine is working, but it is difficult to find significantly performance increasing, in my case.
    Coroutine is updating React() every next frames. It is same frequency but take more cost than case of not using coroutine I think.

    Have you any idea or suggestion?
    I'm worrying I have something mistake...
     
    Last edited: Aug 6, 2017
  4. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Yes, I've actually watched it in full or in part about a dozen times. I learn something new every time I do.

    I just watched the full video again thinking I missed something. I saw flocking behavior with the escort mission, and hunt/circle/attack with the interactors, but I didn't see the setup of flocking behavior with the interactors. If that's possible, I can definitely achieve what I'm trying to do. I have a zombie herd and a running survivor, and I have hunt and escape interactors setup and working for them, but I don't think the escort mission will work for the level of detail I'm trying to achieve.

    Is it possible to setup herding/flocking/packs with interactors rather than the escort mission?
     
  5. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Huh, guess I need to go rewatch my own videos! :p
    I could have sworn I set them up for Interactor based flocking, but maybe I was going to, but decided to do Escort based instead. :-/

    Yes, it is most defiantly possible to setup flocking behaviors using interactors.
    Here is what you will need:
    Behaviors:
    > FLOCK_LEASUIRE: with any number of rules for varied actions while the AI is within a certain distance from what it is following.
    > FLOCK_FOLLOW: Which will be called when the leader is further away than it's leisure range.

    Interactors:
    > Flock Leasuire:
    > If within a specified range, and visible.
    > If Creature Object is NOT Owner Object AND
    > Creature Behavior is NOT Flock_Leasuire or Flock_Follow

    > Flock_Follow
    Same restrictions as Flock Leasuire (except it should have a large selection range)

    This should help get you started (I hope anyway :p ). :)
     
    Last edited: Aug 7, 2017
    jabevan likes this.
  6. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
  7. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
  8. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
  9. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72

    Cool, I got this to work. It's definitely going to take some tweaking, but so far so good. Thanks!!
     
    TonanBora likes this.
  10. DivineMercy

    DivineMercy

    Joined:
    Jun 28, 2016
    Posts:
    33
    Does anybody have experience with adding root motion to an animation via Blender, and importing it back into unity to use with ICE? If so would you mind helping me out a bit?
     
  11. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I have noticed that the Audio settings accepts multiple clips. I have populated this section in my attack action with 10 clips, expecting them to be randomly selected from.

    When the character executes the attack action the first time, it does play one of the clips. Next and subsequent attacks, nothing.

    Any advice or insights?
     
  12. Deleted User

    Deleted User

    Guest

    Hey all, I've just been having a look at ICE and really like what it does! Is it a worthwhile purchase for someone like myself who works mainly in 2D? My 'ideal' situation is to find something that can be used to keep enemies interesting, such as avoiding walls when running away from a player, or decided to attack said player shortly after that, etc.

    It's been a long day so if any of that doesn't make sense, feel free to drop a foot in.

    Thanks
     
  13. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    I'm running into a really strange behavior. I am refactoring my Animation Controller from a Blend Tree to a simpler solution following @TonanBora 's tutorial. My settings are exactly the same, nothing special. The problem is that I'll have creatures get stuck in a loop where they turn a step or two and then rotate (skating) back, the turn a stop or two and rotate back, over and over again. When I look at the Info tab it says the creature is Walking, but here's the curious part... below is a screen shot of the Animation Controller for a creature stuck in this loop:



    As you can see (click for full size image) on the left, the Direction is 44.7 yet the Left Turn animation is being called. You can see on the right that the condition for the Left Turn is a Direction Less than -10.

    So how is the Left Turn being called?? Is this the cause of my problem, or only a symptom of the problem?

    Here are my Behaviour settings:

     
    Last edited: Aug 11, 2017
  14. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Make sure the transition FROM Left Turn TO walk is correctly setup (in other words, set to transition when Direction is Greater than -10.1).
     
  15. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Didn't do anything. Same behaviour is happening.
     
  16. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Did you forget to untick the Has Exit time on all transitions?
     
  17. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    No, I double checked that too. I left the scene running with 15 creatures and eventually ever single one of them got caught in this loop. I can't figure it out, I'm setup exactly like your tutorial.

    I don't know why it would, your tutorial worked perfectly, but could this have anything to do with Angular Speed? The Blend Trees in Pit's Mecanim example use Direction for the Idle turns and Angular Speed for Walk and Run turns. But that's also Blend Trees versus a single layer State Machine.

    EDIT: I abandoned the turns. I was able to get the same basic effect by smoothing the target selection, making it look exactly like the steps that were being taken were turning steps.
     
    Last edited: Aug 13, 2017
  18. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I am having a lot of issues with this asset. Ragdoll replacement should be pretty straightforward. Please tell me what I am doing wrong. When I shoot my little zombie, he just disappears!
    Essentials Screen:
    upload_2017-8-11_22-56-29.png H]
    Status Screen: upload_2017-8-11_22-55-32.png
    upload_2017-8-11_22-55-32.png
    I would appreciate any help getting this working.

    Mark
     
  19. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    Last photo, under Corpse, your Removing Delay is set to 0, which is instant.
     
  20. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Thanks for the help, but I thought that too. Setting it to 20 made no difference, and the docs say 0 equals never remove the body.
    Mark
     
  21. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    If you hit that SAVE button at the top-right of your first image it will create a .cc_preset file (typically around 500kb in size). If you post that here I can take a look by setting up my own AI using those settings to better troubleshoot what the problem could be.
     
  22. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I would appreciate the help.
    Is there somewhere on the great Information Highway that someone has stored some working cc presets? With all of these options and different scenarios, it sure would be handy to have a basic biped, quadruped, crawler, etc. to start from.
     

    Attached Files:

  23. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    So I noticed the DEAD behavior was enabled, where in your screenshots it is not. So I disabled it, then set the value of the below image to 0-0. This makes the corpse spawn correctly, and respect the corpse remove delay timer. The value highlighted yellow in the image is the time the AI will play its death animation (when DEAD is set), and once that is over the AI corpse is replaced with a ragdoll. But if all you want is ragdoll, disabling DEAD and making the value below 0-0 should give you what you need.
     

    Attached Files:

  24. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    I wish! They are a great way to learn ICE functionality and behaviors.
     
    jabevan likes this.
  25. bonsaisushi

    bonsaisushi

    Joined:
    May 18, 2017
    Posts:
    34
    This asset is amazing, I needed something to make some simple wandering animal and with just some minutes I setup a working model

    I was wondering if will be implemented a way to make the model (animal) idle from time to time, as having it always moving does not look really natural

    Also is there a way to damage the creature with touch input? Like the user tap on the screen and the creature receives damages?
    Could you help me, I kinda suck at coding, but with the experience I've had with some trials it may be simple to a senior dev :)

    @TonanBora
     
  26. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    Need to create a second WALK rule under BEHAVIOURS. The attached image I put together will help the most, but basically the "Rule Length" for "WALK Rule #1" determines the random time range the AI will walk (wander), then somewhere in that range "WALK Rule #2" will get triggered. Its "Rule Length" is how long you want the AI to idle. With both rules, you can set a range, or an exact time value.

    Hope this helps.
     

    Attached Files:

  27. bonsaisushi

    bonsaisushi

    Joined:
    May 18, 2017
    Posts:
    34
    It worked like a charm! Thanks a lot, this is crazy :)
     
  28. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Ah, yes, try removing the Angular Speed from the Movement options. Since the AI is going to use root motion, you should not need to have another force trying to turn it.
     
    Ryuichi173 likes this.
  29. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi everyone,

    I have to say DON'T enabling UseCoroutine, for now.:(

    I had tested coroutine some cases, and I have to say enabling UseCoroutine makes worse effect than disabling it, in conclusion. Perhaps to using Coroutine needs more resource than using Update() under the same condition.

    Anyway, because React() would works every next frame even if whether UseCoroutine has enabled or not, so that change makes no bad effect to the projects.:cool:
     
    Last edited: Aug 14, 2017
    TonanBora likes this.
  30. bonsaisushi

    bonsaisushi

    Joined:
    May 18, 2017
    Posts:
    34
    Hi @TonanBora
    Is there a way to damage the AI by touch input? (Mobile)

    EDIT: I've setup a virtual button (currently using it in AR), by now it just playes animation, but I want it to deal damage on press, any hint? :)

    Code (CSharp):
    1. using UnityEngine;
    2. using Vuforia;
    3.  
    4. public class virtualButtonScript : MonoBehaviour, IVirtualButtonEventHandler
    5. {
    6.     GameObject spider;
    7.  
    8.     void Start()
    9.     {
    10.         spider = GameObject.Find("spiderPrefab");
    11.         GameObject virtualButtonObject = GameObject.Find("actionButton");
    12.         virtualButtonObject.GetComponent<VirtualButtonBehaviour>().RegisterEventHandler(this);
    13.     }
    14.  
    15.  
    16. //Called when the virtual button has just been pressed:
    17.      public void OnButtonPressed(VirtualButtonAbstractBehaviour vb)
    18.     {
    19.         Debug.Log("button Pressed");
    20.         //ADD DAMAGE ICE
    21.         spider.GetComponent<Animation>().Play();
    22.     }
    23.  
    24.  
    25. //Called when the virtual button has just been released:
    26.     public void OnButtonReleased(VirtualButtonAbstractBehaviour vb)
    27.     {
    28.         spider.GetComponent<Animation>().Stop();
    29.     }
    30. }
     
    Last edited: Aug 14, 2017
  31. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Thanks @lod3. That seems to work. Mostly. I say mostly, because it does sometimes, other times dude just disappears.

    Other flaky things I have found as I have worked with this tool is that sometimes the NavMesh behaves oddly. I have a different zombie model that I setup using a load of the previous ones settings. After adjusting animations in the behaviours to match the animator, when I shoot him, he just glides away. The more I shoot him, the further away he slides.

    Then I noticed that the first zombie stopped doing anything. He stayed in idle, even when I was right up against him. All of the interactions were firing, but he was not doing squat. I removed all but the first, and set movement method from navmesh to internal. Worked. Set it back to navmesh, and WORKED! I have 4 zombies setup at the moment, and will spend the week seeing if I can figure out what is what.

    Thanks again for your help. Where is Pit? He has not responded to multiple emails.
    Mark
     
  32. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    Part of a response Pit gave to an ICE review this morning.
     
    Tethys likes this.
  33. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141

    Hi bonsaisushi,

    Have you read API?
    Here is the API for ICE. I think it would be help for you.

    Anyway, you have a lot of ways for do that.

    For example, spawning bomb(weapon) to touched area is one of a smart way I think.
    Because you don't have to write a lot of code, but you only have to write a code for touch input spawning system.

    About the Damage handling, this manual's 83 page and Death match demo scene(especially bomb setup) would be big help for you.

    I hope tips would help for you.:)
     
    Last edited: Aug 15, 2017
    bonsaisushi likes this.
  34. ugnershov

    ugnershov

    Joined:
    Oct 5, 2014
    Posts:
    1
    How to use IceCC with Unity Networking (not Photon)?
     
  35. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Coming in a 1.4 update I believe.
     
    lod3 likes this.
  36. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hey guys, I just updated my project to unity 5.6, and wondering if ICE can work in this environment.
    And how do I update navmesh in runtime through codes?
    Also, would be great if someone knows when the v1.4 will come out :)
     
  37. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    Wondering the same. I've asked here before, and emailed the author about it, but never got a reply. 5.6 seems to work, but the warnings ICE spits out concern me.

    According to the author in a reply to a recent review of ICE, August 28.
     
  38. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    That's not a very far future! I'll just wait the new version to integrate ICE into my project, hope the first release is not too buggy :/
     
  39. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    I know it says Ice is Photon compatible, but it always seems to come up as a mystery when I ask about it. Does Photon and network spawning/pooling via ICE only work out of the box or do I need to do anything special to make this work? All of my creatures are already networked with Photon so have the components on them - just not sure how/if networked spawning and pooling is working (and damage of course as well) via Photon and the main Ice Creature Control manager component. I'm loathe to bring it into my already big project that is Multiplayer until I know I can use it. Using it in my single player VR game now and it works great.
     
    Ryuichi173 likes this.
  40. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    How can I get my martial arts melee character to attack from a 90 degree angle, instead of head on?
    I've tried selecting OFFSET instead of CENTER, but I don't see where I type in the offset position. She squares up like a boxer, and throws jabs and roundhouses. Any ideas?
     
  41. FoggierFour

    FoggierFour

    Joined:
    Jul 24, 2016
    Posts:
    2
    Hi, I would like to use ICE and Invectors "Third Person Controller Meele Combat" together. According to the Unity website version 1.3.7 has already been released, but it can not be downloaded. I get the version 1.3.6 every time, the "ICEIntegration.unitypackage" does not work either. Operating System Win7, Unity 5.6.2f1.
     
  42. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    Have you tried this one? It's supposedly been updated for 1.4: http://www.icecreaturecontrol.com/forum-news/?view=thread&id=24
     
  43. FoggierFour

    FoggierFour

    Joined:
    Jul 24, 2016
    Posts:
    2
  44. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    No one has the answer to attacking on an angle?

    How about headshots? I tried to do this by creating a BodyPart definition for the head, attached the trigger sphere, adjusted the size and eliminated overlap with the main collider, gave it a durability of 1, and adjusted the damage modifier to x1000. No dice, still takes 6 shots to kill it. Anyone?

    One more. I am using UFPS-MP. Am I supposed to add the Ice World Damage Adapter to creatures and tick the (only available) check mark for Use UFPS Damage, or is there a UFPS Adapter that I should be looking for? My damage adapter does not look like the examples in this thread (like below). It only has one check box, Use UFPS Damage.
    upload_2017-8-17_9-8-45.png

    Mark
     
  45. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Hey guys, running into a couple issues with setting up ICE in an dynamic environment and thought I would ask here.

    1. I like to spawn enemies around the player, which is multiplayer and spawns upon entering the Room (Photon, Main Level scene). Not an issue when working with a static scene and the item to spawn around is in the scene already when setting it up in the editor. I find I cannot get this to work though if the actual player isn't in the scene when setting up the creature register for the TAG spawnpoint option. For some reason, on the Creature Register, when setting spawn point TAG fails to work if an item with the TAG is not in the scene. If I add a dummy item to the scene with the tag and disable it, when the game starts it still wants to spawn on the disabled item with the TAG rather than the actual correct live items with the TAG in the scene. Right now, I would like to spawn on either the Tree or Player tag, both of which are items that are added to the scene at RUNTIME. Setting the TAG dropdown for Spawnpoint just turns red and keeps going back to Untagged. How do you guys work around this? Is there a switch of some sort to make ICE stop looking for the tag when setting it up in the editor? I am leaving ICE in the play scene that players spawn into, so that when the scene starts up ICE is there and the world generates. Initially I thought of a hack could be to have a dummy player tagged empty GO in the scene do that I can set the tag, then parent it to the player when they spawn into the scene. This is not ideal though -would rather just be able to use the TAG feature on the creature register and it work when everything is activated and it searches for an item with that TAG. This seems to work fine for creatures HOME. Thanks in advance for suggestions.
     
  46. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    @icetec - Does Photon and network spawning work with the current version of ICE and Unity 5.6 on the asset store? The setup seemed pretty easy and straightforward, yet I cannot get any creatures to spawn once I add the network spawner and the ICEWorldNetworkManager. I have Multiplayer enabled. When I enter the Room/play scene, I can see on the log the last messages from the IceWorldNetworkManager are:

    Info: OnJoinedRoom() - This client is in a room.
    Info: Client state changed to MASTER!
    Info: Connection state changed from Joining to Joined.

    Everything looks good, sitting in my world but no creature spawns. :p I can turn Enable on and off for spawning, nothing seems to get it started. What am I missing? This works find of course without all the network stuff so my initial setup on the creature register seems correct.
     
    Last edited: Aug 18, 2017
  47. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    675
    Dug into the ICECC script, but could not find anything related to attack angle. (Someone feel free to correct me here).

    For headshots, I would need to see a screenshot of your head's Body Part script. It could be a few things, but without seeing all your settings it is difficult to diagnose.

    As for multiplayer, I believe this is currently busted in 1.3.6 (again, someone correct me here if I am wrong), but should be fixed in the upcoming 1.4 update on August 28.
     
    Tethys likes this.
  48. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Maybe look into the body orientation or the view direction related scripts and add 2 new options that use the right 90 degree and left 90 degree to be the facing direction rather than Z axis?
    Or another work around is to use root motion for the side kick or any side attack animations and turn the animation's root bone itself to the desired degree?
     
  49. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Hmm, I may not be using it correctly, what is the Offset function for, then?
    upload_2017-8-20_15-8-9.png

    No special script, just using the Ice Item script on the head object and trying to transfer damage back to the Ice controller script on the root object. It transfers the damage, but the damage multiplier appears to have no effect on the damage sent. I read way back in the thread here that this was originally due to damage calculations based on percentages, but that it was fixed. Guess not.
     
  50. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Here is what it looks like. The "Get Big or Die Trying" guy is looking off into space. When he kicks or punches, it is towards where he is looking. I need to shift his focus about 30 degrees south.

    upload_2017-8-20_15-19-19.png