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

[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. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Advanced ICE - Mecanim/A*/Final IK Tutorial(s) Request

    I know some of this is covered in @TonanBora 's tutorials, but these are a list of things I'd love to see in a tutorial series and how Mecanim changes things. Since these assets combined (ICE, A*, Final IK, UFPS, etc) cost a lot of money and WAY more time, I would be willing to pay a healthy price for a comprehensive tutorial series ($100+ or a Paetron membership to learn all of this) - considering the alternative is spending a crazy amount of time and maybe even giving up on assets and losing out on all the time and money.
    • Turning in place.
    • Turning while walking.
    • Selecting randomly from a list of walk/run/etc animations (how does Mecanim affect this?).
    • Herd behavior with varying leaders (ie if one notices prey its hunting behavior triggers the herd to now follow that one until they notice the prey and their own hunting drive takes priority)
    • Hunting - Attack - Feeding on a corpse (how in the world would you set this up in Mecanim)?
    • Dynamic collision detection, avoiding obstacles (and not clipping through the obstacle as the creature walks around), avoiding others in the herd, and avoiding doors while they're closed and walking through them when they're open... (what's the best feature option, what's the best 3rd party option - and how to implement it, A*?).
    • Tactical behavior.
    • Picking up items (weapons, etc), and dropping them when they die.
    • Companion behavior.
    • Flying behavior.
    • UFPS integration.
    • Final IK integration.
    • Other top 3rd party integrations.
    • Optimization.
    • etc.
    @icetec @julianr
     
    Last edited: Jul 28, 2017
    froslie, TonanBora and julianr like this.
  2. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    No worries. Looking forward to it when you have a chance.
     
  3. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @jabevan Just built up a new PC for video creation/editing. So I'll be on to some of those once I get back into ICE this week :)
     
  4. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    @jabevan
    Here are some pictures for you:
    Mecanim Controller.png
    Simple Mecanim controller layout.
    For the transition to the turns, I have them set:
    Run_Turn Left << Direction less than -10 << Run Forward
    Run_Turn Left >> Direction greater than -10.1>> Run Forward

    Run Forward >> Direction greater than 10 >> Run_Turn Right
    Run Forward >> Direction less than than 10.1 >> Run_Turn Right

    The walk turns follow the same pattern.

    Behaviors:
    Dragon_Idle.png
    Dragon_Walk.png
    Dragon_Run.png

    However, do be warned that Root Motion, and ICE do not work well with any navmesh system that I have tried (Unity's, and A*), so if it does not seem to work, switch the AI over to Internal pathfinding and see if works.
     
    Ryuichi173, lod3 and jabevan like this.
  5. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Quick question: What is the Creature Register > Pool > Spawn Randomization> Random Size Variance setting?
     
    Last edited: Jul 29, 2017
  6. YPGames

    YPGames

    Joined:
    Mar 14, 2015
    Posts:
    7
    Because we want to generate enemies dynamically in different places
    It can not be determined until the Target Object of Essential's Home Location is generated
    I want to dynamically set an object that exists at the location generated at the time of creation
    I do not know how
     
  7. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hmm,,,Is that mean, you want to know how to spawn random enemy from random point?o_O

    ICE controlling spawn creature by editing ICECreatureRegister.
    You can edit where and which creature to spawning by using Pool Management.
    By default your creatures will use HOME location as spawn point and all the other object types the position of their given reference objects, but you are free to define as much points as you want by using spawn point option.

    ICECreatureRegister would automatically installed when you place your first ICE CC creature on your scene.
     
    Last edited: Jul 28, 2017
  8. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Alright guys, took me long enough, but here is a short video on setting up a Mecanim controlled creature that uses Root Motion, and turns.
     
    Dwight_Everhart, jabevan and lod3 like this.
  9. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    @YamiuchiProject I'm working on this now myself. Take a look at these settings under the Creature Register. These will help you:



    Notice the SpawnPoint can be set to pretty much anything. Also, the Random Range at the bottom allows you to set a circle around the the SpawnPoint. For example, you could have your Player in the creature register and set it as the SpawnPoint. Then you can set your Random Range to 50-75 (or 500-750, or whatever). This way your creatures will randomly spawn in a circle 50-75 meters away from your Player.

    I haven't tried it yet, but I believe you can also use something like the Object, Tag, or Type to identify different areas on your map, like a biome (ie spawning in a forest or desert or city, etc). Maybe someone else has more info about how to do this?
     
    Ryuichi173 likes this.
  10. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Herding Observations

    I setup the following herding parameters on 40 creatures that spawned over about 10 minutes and then let it run for about 3 hours. What I ended up with was four different groups (circled in red) way outside the home area, and one way off the plane. Also, checkout the Profiler....



    This is related... Notice that my selection range is only 5 meters. When the creatures first spawn, even if they're 50 meters from anything else, their target location radically moves continuously around them. Like @TonanBora 's herding video tutorial, there should only be one leader of a group and that leader should be moving to a target within the home area - and the herd should follow them. Because the target area is radically changing around the creatures at all times, there is no leader moving towards a target within the home area. According to my settings, the creature should only be looking for a new leader to follow every 60-120 seconds. That's not happening, it's shifting constantly. I also experimented with the selection angle being as low as 90, but creatures would do a 180 to (momentarily) follow another creature.

    Bottom line, what's ending up happening is small groups forming with radically changing leaders and targets that stumble around and make very small movements (that become big over 3 hours).

    The other issue is the Profiler. What's happening here?!? This looks like a race condition to me (@icetec). What started out as 5-10 ms on the CPU and GPU at the high end, has become a solid 300+ ms CPU and ~30 ms GPU. This is only 40 creatures.

    I've been working through the logic and experimenting with this for a few hours. I'm not sure what's causing the radical change in targets, the group behavior, or what looks like a race condition.

    EDIT:
    I just noticed in the Info tab that a target is also selecting itself. This is only noticeable because I added a Delay Timer and Retention Timer. So this explains the radically changing targets and potentially the race condition. Is there a logic statement I can add to keep the creature from selecting itself?

    EDIT - Answered: I added TargetDistance > 0.25 to the Condition Group and that seemed to fix the creature selecting itself, which is apparently what was causing the radical change in targets and the group behavior issues. Without the radically changing targets (caused by selecting itself and Home back and forth) the group behavior has normalized and looks much better.

    BUT, the CPU and GPU times are even worse. Is there a way to optimize?


    (Hopefully posts like this help others experiencing the same...)
     
    Last edited: Aug 3, 2017
    Ryuichi173 likes this.
  11. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Yes there is:
    TargetGameObject NOT Own GameObject
    Try unticking the "Use Corutines" option in the creatures Runtime behavior located in the Essentials menu.
     
    jabevan likes this.
  12. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    I did try this statement but it didn’t work for me. What I ended up with is TargetDistance > 0.25 which worked and also made the crowding look a little better too.

    I was wondering about this. I saw your previous recommendation, but @icetec seems to indicate it’s important. Are there side effects to unchecking coroutines?
     
  13. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Normally, Coroutines are a better option, but as of now, for some reason letting ICE use Coroutines causes massive CPU spikes.
    I have not seen any issues as of yet by not using them, and as I said, unticking it for me drastically reduced the spikes.
     
  14. jmarceno

    jmarceno

    Joined:
    Nov 25, 2016
    Posts:
    8
    For me it reduced the spikes, but I'm still getting high CPU utilization and GC Alloc up to 3.2MB with 10 to 20 creatures.

    Other thing that start happened this week is my creature getting stuck on the attack behavior without "repeating it". It Sense, Hunt, Attack...and that is it. For the creature to attack again I have to run away and for the behavior all over again. Any tips on where I messed up?

    tks
     
  15. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Care to post pics of your Interactors and Associated behaviors?
    One thing to check, is if the Attack animation is set to loop in the Behavior settings, and to be on the safe side, in the Animation's import settings.
     
    jmarceno likes this.
  16. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi jabevan,
    basically, there are two critical processes that could slow down ICE. The first critical point are too many loop cycles during the target selection (dependent to the number of interactors and the given selection criteria) and the second one are the raycasts which will be used for the correct grounding and body-orientation but optionally also for the internal pathfinding.

    According to the set reaction time, the target selection does not be run in every frame update and is also processed in a co-routine (if 'Use Coroutines' is active). On the other hand, the Raycasts are required in each frame-update, to scan the given environment and to adapt the transform values of the creature accordingly to it. Therefore it is advisable to adapt the associated values of the 'Avoid Water', 'Slope Limits' and 'Obstacle Avoidance' options, carefully and thriftily according to the given scene - less is more!

    Regarding the co-routines, there is in fact a strange behavior in v1.3, because normally co-routines should speed up processes and not slow them down. The cause was a stupid error of mine, because I wrongly use 'yield return null' and thus the routine is called unnecessarily often. However, this is already replaced by 'yield return new WaitForEndOfFrame ();' and now the routine runs as expected.

    Here you can find the code (ICECreatureCharacter.cs) if you want to change it directly.
    Code (CSharp):
    1.        
    2.         IEnumerator CoUpdate()
    3.         {
    4.             while( RuntimeBehaviour.UseCoroutine )
    5.             {
    6.                 // coroutine is alive ...
    7.                 m_CoUpdateIsRunning = true;
    8.  
    9.                 // basically the React method is using an internal timer but in some cases we need also an immediate
    10.                 // reaction, so we are using WaitForEndOfFrame instead of WaitForSeconds.
    11.                 React();
    12.  
    13.                 yield return new WaitForEndOfFrame();
    14.             }      
    15.             m_CoUpdateIsRunning = false;
    16.             yield break;
    17.         }
    18.  
    Hope this will be helpful to you!

    Have a great day!

    Pit
     
  17. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi all,

    I have run the integration option to try and add integration for Unistorm and now I get an error.

    Assets/ICE/ICEIntegration/Scripts/Core/Editor/Components/ICEWorldNetworkSpawnerEditor.cs(66,13): error CS1061: Type `ICE.Integration.Adapter.ICEWorldNetworkSpawner' does not contain a definition for `UseDeactivateSceneCreatures' and no extension method `UseDeactivateSceneCreatures' of type `ICE.Integration.Adapter.ICEWorldNetworkSpawner' could be found. Are you missing an assembly reference?

    I don't use any network features as the game is single player only. I expected it to only find Unistorm.

    Any idea how to reverse this?
     
  18. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi Andy, please open the Player Settings and remove ICE_CC from the scripting define symbols - this should fix it!
     
    lod3, moorooboorai and AndyNeoman like this.
  19. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Thanks for the immediate response Pit. All seems to be fixed with that change. :).
     
    lod3 and moorooboorai like this.
  20. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    671
    Will ICE_CC be functional in 1.4?
     
  21. jmarceno

    jmarceno

    Joined:
    Nov 25, 2016
    Posts:
    8
    The whole problem was the Target Event repetition time and not the the interaction. Thanks for the help.
     
    TonanBora likes this.
  22. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    @icetec
    Pit, I have been trying to contact you via email, but you seem to be ignoring those.
    These are screenshots of 25 ice creatures with some slightly more complex interactions. This is with 'use coroutines' with the fix you suggested:
    Screenshot (147).png

    this is not using coroutines:
    Screenshot (148).png

    101ms for 25 creatures ?!? This is just ridiculous. Are you tackling performance issues for 1.4?
    I have suggested you some fixes and would like to know if those will be added to 1.4? I can also help point out the problematic places, but if you are going to ignore this, please let me know, so I can use behavior designer instead.
     
  23. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Oh, it is an interesting result!o_O

    According to Pit, it is because of the routine was called unnecessarily often and he tried it solved.
    I'm not sure but it seems that failed in your case.

    I'm wondering how if it would be if you use WaitForSeconds() instead of WaitForEndOfFrame().
    But it might be because my scene is too simple, so it is difficult to find difference among them...
    Have you ever been try that?
     
  24. jmarceno

    jmarceno

    Joined:
    Nov 25, 2016
    Posts:
    8
    Same here, the suggested fix did not solved the problem.
    One thing that I observed is that that problem escalates quickly is complex/real terrains, if I try to test is a sandbox with my ground being just a plane, the problem starts to appear much later (around 60 creatures instead of 20).

    One important thing on my side is that I'm testing with only ONE interaction. (Creature sense, hunt and attack Player, nothing more).

    It would be nice to have a fix in place for 1.4, because as it is. Is just not feasible to use.
     
    Ryuichi173 likes this.
  25. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    671
    Anyone running 1.3.6 in 5.6.2f1 (or any version of 5.6)? I get warnings for ice_CreatureDebug.cs, ice_CreatureMove.cs and ICEEnvironment.cs. Most perplexing is a warning that gets spammed to the console during runtime, but only appears in the console after stopping Play mode:
    The above warning is referencing ICE's TeddyBear that uses the ICEDirectController. Seems the controller is now being ignored in 5.6, but for some reason the creature still moves.

    So far things seem to work (no extensive testing yet), but I've noticed an average increase of 1-2ms, with constant and consistent 2-3ms spikes. This is with coroutines still disabled, and without changing anything from my 5.5 project.

    I'd post the actual warnings, but I figured anyone installing a fresh copy of 1.3.6 in an empty 5.6.2f1 project would've seen these as well.

    Anyway, thanks for reading :)
     
  26. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Sadly, I'm same situation. After few times test, I noticed that it can be reproduced in my scene, too.:(
    It seems that currently version of ICE is weak at garbage collection, and especially at coroutine for now.

    EDIT:

    Wait... Why "WaitForEndOfFrame ()" is "()"?
    I guess it means that ICE checking interaction and ray casting routine per 1f!
    There are nearly no difference "yield return null" and "WaitForEndOfFrame ()" in Unity, I think.
    Of course it can be reason of overhead easily!

    Have anyone try rewrite this section to below?

    Code (CSharp):
    1.  
    2.         IEnumerator CoUpdate()
    3.         {
    4.             while( RuntimeBehaviour.UseCoroutine )
    5.             {
    6.                 // coroutine is alive ...
    7.                 m_CoUpdateIsRunning = true;
    8.                 // basically the React method is using an internal timer but in some cases we need also an immediate
    9.                 // reaction, so we are using WaitForEndOfFrame instead of WaitForSeconds.
    10.                 React();
    11.                 yield return new WaitForSeconds(.1f);
    12.             }
    13.             m_CoUpdateIsRunning = false;
    14.             yield break;
    15.         }
    16.  
    I guess bigger number may reduce the problem.
    I cannot test it few days because of my personal reason...sorry.

    EDIT:
    Of course this modification can be make AIs odd because it force ICE to delaying checking routines.

    ICE is compatible till Unity 5.6.0 periods. It seems that Unity has changed internally since Unity 5.6.1 and it is reason of incompatibility with ICE.
     
    Last edited: Aug 5, 2017
  27. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    671
    Did some testing with 5.6.0 yesterday, but getting the exact same warnings as 5.6.2, and nothing's visibly changed, both in the AI and the Profiler. I'll go ahead and post the warnings:

    Code (csharp):
    1. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(684,26): warning CS0618: `UnityEditor.Handles.CubeCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CubeHandleCap instead'
    2. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(685,26): warning CS0618: `UnityEditor.Handles.CubeCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CubeHandleCap instead'
    3. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(686,26): warning CS0618: `UnityEditor.Handles.CubeCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CubeHandleCap instead'
    4. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(687,26): warning CS0618: `UnityEditor.Handles.CubeCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CubeHandleCap instead'
    5. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(695,26): warning CS0618: `UnityEditor.Handles.CubeCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CubeHandleCap instead'
    6. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(696,26): warning CS0618: `UnityEditor.Handles.CubeCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CubeHandleCap instead'
    7. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(697,26): warning CS0618: `UnityEditor.Handles.CubeCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CubeHandleCap instead'
    8. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(698,26): warning CS0618: `UnityEditor.Handles.CubeCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CubeHandleCap instead'
    9. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(908,24): warning CS0618: `UnityEditor.Handles.ArrowCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use ArrowHandleCap instead'
    10. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(917,25): warning CS0618: `UnityEditor.Handles.SphereCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use SphereHandleCap instead'
    11. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureDebug.cs(938,25): warning CS0618: `UnityEditor.Handles.CylinderCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use CylinderHandleCap instead'
    12. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureMove.cs(1496,28): warning CS0618: `UnityEngine.AI.NavMeshAgent.Stop()' is obsolete: `Set isStopped to true instead'
    13. Assets/ICE/ICECreatureControl/Scripts/Core/Objects/ice_CreatureMove.cs(1502,28): warning CS0618: `UnityEngine.AI.NavMeshAgent.Resume()' is obsolete: `Set isStopped to false instead'
    14. Assets/ICE/ICEEnvironment/Scripts/Components/ICEEnvironment.cs(149,24): warning CS0618: `UnityEditor.Handles.ArrowCap(int, UnityEngine.Vector3, UnityEngine.Quaternion, float)' is obsolete: `Use ArrowHandleCap instead'
    Aside from the debug script, are the ice_CreatureMove.cs and ICEEnvironment.cs warnings benign? Just worried they could lead to issues down the line.
     
  28. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Oh really?:eek:

    I've tested at Unity v5.6.0p4 some weeks ago, but I hadn't met such reports.
    Unity 5.6.0 was quite buggy and some critical bugs was there, so I suggest patched versions.
     
    Last edited: Aug 2, 2017
  29. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    are those 20+mb allocs per frame??
     
  30. jmarceno

    jmarceno

    Joined:
    Nov 25, 2016
    Posts:
    8
    @rasto61, did you got any direct response from @icetec ?
     
  31. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    unfortunately yes

    not yet. 2 weeks ago he replied to an email saying that he was working on removing some smaller issues from 1.4 after which I asked him about the optimizations (better said fixes, since this is pretty much unusable) (I can fix most of the slowdowns but theres no point if 1.4 is just going to reintroduce them) to which he never replied :(
     
  32. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    I'm happy to say this solution did help. My Pofiler was reading CPU 20.54ms GPU 8.97ms. Now, after Pit's suggested change, my Profiler is down to CPU 7.88ms GPU 8.86ms.

    EDIT: I may have spoken too soon. I let it run for thirty minutes or so and then started checking the states of each creature that was supposed to be herding. No one was herding, and the info on each one I selected didn't indicate any target other than HOME (ie they were never herding). Also, they were running everywhere. Originally (like @TonanBora 's tutorials), they would run when they were out of area to get back into the Home area, then walk. The code change above is the one and only change I've made.

    Back to testing and failing, testing and failing, again until I figure it out.

    Confirmed: I removed @icetec 's change and the herding behavior began again and the correct walk/run cycle began again.
     
    Last edited: Aug 3, 2017
  33. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Was there ever a consensus for static and dynamic collision detection, or am I reading it right that none of the included movement types succeed and A* Pathfinding is required - which no longer works with ICE?

    I'm looking for a few basic rules to make the creatures play nice:
    1. Don't walk through walls.
    2. Don't walk through closed doors.
    3. Don't walk through other creatures (or players).
    Is this possible yet?
     
    Last edited: Aug 3, 2017
  34. BusterTheWizard

    BusterTheWizard

    Joined:
    Jul 2, 2012
    Posts:
    55
    I'm trying to make basic DOOM type enemies and one thing has kept me stuck.

    How can I make my creature "remember" there is a player right outside their field of view that they were just chasing instead of going back to wandering right away?
     
  35. sylon

    sylon

    Joined:
    Mar 5, 2017
    Posts:
    246
    This is really sad.
    I guess i joined the ICE club at the exact wrong moment.
    One of the reasons i decided to go with ICE, was evidence of good and fast support.
    But since then, bit by bit it's getting worse.
    No idea what's going on, but i'm really frustrated about the amount of time i have put in this with nothing solid to show for. Wish i had put that time in a simple system of my own.
    (wanted to say that for a few weeks now)
     
    Salja likes this.
  36. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    I'm also really frustrated I'm waiting for 5 weeks to implement for ootii currently I can not do anything with ICE.
    In addition, I have conflicts with other assets so everything does not run as it should
    I find it very sad I have to spend money and can not really use it I had hoped for a fast implementation

    But for the future I will be smarter and not trust any more I will wait a few more days and hope the support for ootii comes otherwise I will have to switch to another System

    It is not meant to be evil it is only my personal opinion
     
  37. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352

    Well the internal movement is nice to get you going fast and works in some scenarios. For what you mention I had success using unity ai navigation. You just need to set everything properly with nav mesh obstacles and appropriate agent sizes.
     
  38. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    When you say Unity AI Navigation, do you mean the NavMesh? Just to confirm, is it dynamic? Will it avoid other creatures and other moving obstacles?
     
  39. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
  40. lukamas233

    lukamas233

    Joined:
    Jan 6, 2015
    Posts:
    29
    hi, I have a question, I am trying to make my game interact with creatures using ice, and can I make interactors do things with Xbox One Kinect, it will be a huge part of my game, and If there is a way, to make creatures interact with the player on kinect, let me know.

    thanks in advance
     
  41. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Hey @nixtwiz , under Target Object > Target Selection Criteria enable RT (which is Retaining Timer). Set this timer to the number of seconds your creature will continue to pursue your target before it gives up.

    @TonanBora doesn't use it, but you can see this setting on his ICE Basics tutorial at the 32:35 time here:

     
    TonanBora and Ryuichi173 like this.
  42. War_Lord99

    War_Lord99

    Joined:
    Apr 7, 2017
    Posts:
    8
    Hi guys,
    anyone knows when the v1.4 will be released please ?

    Thanks for any info.
     
  43. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi All, Has anyone managed to use the inventory/item components and give me a few pointers?

    I have a banana tree, which I have added the ICE plant component, and then a banana which I have added the ICE item component. Enabled inventory for the plant and added banana to it's item list. The option only seems to have drop item on plants death but what I really want is the ability to just pick a banana from the tree. Any idea's?
     
  44. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    86
    Sorry my English is not good My creator move/glide sideways the animation play but the animal is not facing the walking direction where can I rotate the animal
     
  45. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    I am new to animation myself, but this might be a Root Motion issue. Here's an example (of many) forum posts about this:

    https://forum.unity3d.com/threads/character-wont-move-forward.459018/

    I have also seen issues where problem are caused when your models are not "Z-Forward." If your model is not facing the walking direction, it might be a z-forward issue. That's a simpler fix. Search the forums for this solution first.
     
  46. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    I have to say so sorry, but I had done too stupid mistake, so I deleted useless codes.
    Yes, I should do testing the code before publish.:oops:


    By the way, I guess coroutine in ICE isn't working expected because there are no break point.
    In the default, it is written that "while( RuntimeBehaviour.UseCoroutine )"
    That meaning, React() would be recalled every frames if coroutine is on.
    I thought it is one of the causes of overheading.

    I think React would be called by another method if coroutine is off, but case of coroutine is on, then React calling would be ignored.:confused:
    It need times to know what is happening, I think.

    EDIT1:

    I read ICECreatureController.cs carefully, and I realized it should be work.
    Like as I mentioned above, React is ignoring when Updating if UseCoroutine is enabled.
    Perhaps Pit want to call "React()" less frequently than updating.
    So he tried to separate it from Update() but it may be not working expectlly, I guess.


    Hmmm...What strange that issue.
    Maybe "OnDisable()" doesn't work correct, so croutine might be still working evenif creatures have been dead.


    EDIT2:

    Hi everyone, perhaps I found what make caused overheading when UseCoroutine is enabled.
    It has been caused by using "StartCoroutine" in ICECreatureController.cs.:confused:

    Yes, Unity Update() method could be cause of overhead.
    BUT In the truth, Unity's "StartCoroutine" can be cause of overhead easily, too.

    I hope using "MoveNext" and avoiding "StartCoroutine" could reduce the problem.
    Because using "StartCoroutine" and "StopCoroutine" could be cause of problem like this.


    EDIT3:

    Now my scene working 25 creatures with 3ms every frame, but it is nearly same result as disabling UseCroutine.
    I'm suspecting that making React() to croutine makes no mean, for now...:(
     
    Last edited: Aug 5, 2017
  47. DougUnit12

    DougUnit12

    Joined:
    May 2, 2012
    Posts:
    11
    A heads up that Unity 2017.1.03f seems to break ICE. There is a Unity 5.5 IFDEF in a few files that needs to be broadened so that "using UnityEngine.AI" gets included:


    #if UNITY_5_5
    using UnityEngine.AI;
    #endif

    Files affected:
    - ice_creature_editor_essentials.cs
    - ice_CreatureMove.cs
    - ice_CreatureDebug.cs

    I commented out the #if and the #endif as a work-around. Let us know when you get an update posted.
     
    Dwight_Everhart and lod3 like this.
  48. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    To quote:
    You can also define a Seek Interactor that gets called if the target leaves it's field of view, or stops being visible and the last behavior was Hunt/Chase, and have the move target be "Last Known Position".
     
    DougUnit12 likes this.
  49. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Somewhat related question (I'm sure it has a combined interactor / mission solution):

    So I have my flock of zombies directed by an Escort Mission. Zombie's are pretty stupid, so I have them on a 15 second delay timer to follow other zombies within 10 meters. I also have an interaction at the highest priority to hunt a target with no delay and within 10 meters.

    This is what I'm trying to do:
    • I'd like to have a 15 second delay timer to follow other zombies walking.
    • 3 second delay to follow other zombies that are running.
    • 1 second delay to follow other zombies that are hunting.
    In the mission the delay timer is only related to the mission, not the separate conditions. Is there some way I can accomplish this with interactions or with the sensory options?
     
  50. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    I'm using 2017.1.03f and haven't noticed huge issues other than whatever is causing the CPU and GPU to go crazy.