Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Motion Controller

Discussion in 'Assets and Asset Store' started by Tryz, Feb 21, 2014.

  1. ISH_the_Creator

    ISH_the_Creator

    Joined:
    May 8, 2013
    Posts:
    165
    whats the fix for MCS aka morph 3d jaw bone issue when using them with MC?
     
  2. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    I'm not sure why Morph3D's default pose is the mouth open, but look on the Vault (2/3 rd of the way down) and I have a motion with code that will close it.
    http://www.ootii.com/UnityMotionVault.cshtml

    Just put the motion on the 2nd or 3rd layer.
     
    TeagansDad likes this.
  3. ISH_the_Creator

    ISH_the_Creator

    Joined:
    May 8, 2013
    Posts:
    165
    Sweet. I can't wait for the magic pack. It looks great
     
    Tryz likes this.
  4. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Hi,Tryz.
    I want to know how far along is integration between motion controller and playmaker?
     
  5. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    Hi @Piahouka , PlayMaker actions aren't something I'm actively working on. It's on my to-do list, but lower down.

    That said, PlayMaker integration is very similar to Node Canvas integration and I have done that:
    http://www.ootii.com/UnityMotionVault.cshtml#NodeCanvas

    Even if you don't own Node Canvas, you could still download the package and look at the code for actions like ActivateMotion, SetTargetPosition, and DeactivateMotion. You could use that code to create the PlayMaker actions you need.
     
  6. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Thank you for reply.
    I want to create playmaker action but my skill is poor to write code.
    would you make one example playmaker action, please.
     
  7. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Piahouka, TeagansDad and Tryz like this.
  8. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    The PlayMaker forum and site will be the best place for examples and tutorials, but here's one I did a long time ago. This was for Mount Points:

    Code (CSharp):
    1. using UnityEngine;
    2. using com.ootii.Actors;
    3. using HutongGames.PlayMaker;
    4.  
    5. namespace com.ootii.PlayMaker.Actions
    6. {
    7.     [ActionCategory("ootii Mount Points")]
    8.     [HutongGames.PlayMaker.Tooltip("Removes all skinned items.")]
    9.     public class ClearSkinnedItems : FsmStateAction
    10.     {
    11.         // public action parameters here
    12.         public FsmOwnerDefault gameObject;
    13.  
    14.         // Determines if this action runs every frame
    15.         private bool mIsEveryFrame = false;
    16.  
    17.         // private caches
    18.         private GameObject mParent;
    19.         private MountPoints mMountPoints;
    20.  
    21.         /// <summary>
    22.         /// PlayMaker's Start function
    23.         /// </summary>
    24.         public override void OnEnter()
    25.         {
    26.             Invoke();
    27.  
    28.             if (!mIsEveryFrame)
    29.             {
    30.                 Finish();
    31.             }
    32.         }
    33.  
    34.         /// <summary>
    35.         /// PlayMaker's Update function
    36.         /// </summary>
    37.         public override void OnUpdate()
    38.         {
    39.             if (mIsEveryFrame)
    40.             {
    41.                 Invoke();
    42.             }
    43.             else
    44.             {
    45.                 Finish();
    46.             }
    47.         }
    48.  
    49.         /// <summary>
    50.         /// Invokes our function using the parameters
    51.         /// </summary>
    52.         void Invoke()
    53.         {
    54.             // Grab the parent owning Mount Points
    55.             if (mParent != Fsm.GetOwnerDefaultTarget(gameObject))
    56.             {
    57.                 mParent = Fsm.GetOwnerDefaultTarget(gameObject);
    58.                 if (mParent != null) { mMountPoints = mParent.GetComponent<MountPoints>(); }
    59.             }
    60.  
    61.             // Ensure we have a valid Mount Points object
    62.             if (mMountPoints == null) { return; }
    63.  
    64.             // Removes all skinned items
    65.             mMountPoints.ClearSkinnedItems();
    66.         }
    67.     }
    68. }
     
    Piahouka likes this.
  9. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    I did a partial integration with ICE not that long ago. I was able to get the player to damage and kill ICE enemies, but never got around to enemies damaging the player. But I think it would not be that difficult.

    [EDIT]
    https://forum.unity3d.com/threads/motion-controller.229900/page-52#post-2962212
     
    Last edited: May 5, 2017
    Tryz likes this.
  10. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    i working on playmaker Actions for the MC at the Moment a health bar System

     
    Vog, TeagansDad, Malbers and 3 others like this.
  11. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    I decided to use integration among Motion controller, Behavior designer Playmaker so far.
     
    Tryz likes this.
  12. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I think I found a bug... WeaponCore.cs, line 271-272:

    Code (csharp):
    1. float lDistance = Vector3.Distance(lTarget.ClosestPoint, lCurrentPosition);
    2. if (lDistance > _MaxRange) { continue; }
    should probably be:

    Code (csharp):
    1. float lDistance = Vector3.Distance(lTarget.ClosestPoint, lCurrentPosition);
    2. if (lDistance > _MaxRange + rCombatant.MaxMeleeReach) { continue; }
    Otherwise, creatures with a large melee reach but a short weapon (ogre with a dagger) will register as missing even though they are clearly hitting their target.

    One other sort of bug, in MotionControllerMotion.cs lines 1495 and 1560:
    Code (csharp):
    1. int lParseIndexT = rAssetPath.IndexOf(".fbx/");
    If you change those to:
    Code (csharp):
    1. int lParseIndexT = rAssetPath.IndexOf(".fbx/", StringComparison.OrdinalIgnoreCase);
    then it will successfully load files that end in ".FBX" instead of only working on ".fbx". ;)
     
    Tryz likes this.
  13. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    361
    Hello fellow Ootii fans.

    Has anyone been able to create motions for the Sword and Shield package using Kubold's Sword Animset pro animations? And maybe (if im lucky) combined that with Inventory pro?
     
  14. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    Great point.

    Another great point.

    I'll change those for the next update. Thanks! :)
     
    hopeful and makeshiftwings like this.
  15. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Can I also make a suggestion to maybe rethink the whole "Attribute" thing a bit? Your combat stuff would be much easier to integrate if you just had an interface like "IDamageable" with the OnDamaged(IMessage rMessage) function on it, and have the attacks call that instead of requiring that anything that gets hit have an ActorCore with a working AttributeSource. I'm sure I'm not the only one who has a creature/objects stats class that just has health as an int or float, and currently you need a huge amount of boilerplate code just to return that simple float for health. You could just have an IHealth interface has a float Health property if you need to get the health, though an attack shouldn't care about the target's health anyway, it should just send the attack info and let the target figure out what to do. If there was a pressing need to have hundreds of string-named unknown-typed attributes then the current way might make sense, but right now the only place IAttributeSource is actually used is to get the health within the default ActorCore OnDamaged method.
     
  16. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    @makeshiftwings , I'm not against what you're saying, but "Health" isn't the only attribute that will matter in the future. I'm trying to think ahead.

    I'm using IAttributeSource for:
    Attributes (Health, Mana, Intelligence, Wisdom, etc)
    Capabilities (Hearing Range, View Range, etc)
    Resistances (Fire Resistance, Sleep Resistance, etc)
    Tags (Ability to tag objects with multiple tags... "Enemy", "Goblin", etc)

    What's the difference between this:
    float lHealth = mAttributes.GetAttribute<float>("Health");
    and this:
    float lHealth = mIDamagable.Health;

    I don't understand the "huge amounts of code" part.

    With the Spell Casting Magic Pack, the ActorCoreEffects (part of the ActorCore), you can add effects to players that wear out over time... damage-over-time, healing-over-time, fire particle effects, movement speed changes, etc.

    The IDamagable interface is great idea. I don't mind introducing that and having damage go through that. The ActorCore can implement it. But, there's a lot going on besides just "health".

    I have to be more forward thinking as I build these RPG components for games I know nothing about.
     
    Last edited: May 7, 2017
  17. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    I should add that I really am open to evolving these RPG components and the assets.

    I figure after the Spell Casting Motion Pack, it will probably be time to step back and make sure all the things I've done (melee, ranged, spells, inventory, attributes, targeting, etc) all fit together in a good way.

    If we can make it easier or evolve things in a way that helps everyone... I'm game.
     
    TeagansDad and makeshiftwings like this.
  18. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Not that, that's the part that your code calls. I mean that in order to make my existing health system work I had to implement all of IAttributeSource:

    Code (csharp):
    1.  
    2.         private readonly List<string> attributeNames = new List<string>()
    3.         {
    4.             "HEALTH",
    5.             "FUTURE_STUFF"
    6.         };
    7.  
    8.         public bool AttributeExists(string rAttributeID)
    9.         {
    10.             return attributeNames.Contains(rAttributeID, StringComparer.OrdinalIgnoreCase);
    11.         }
    12.  
    13.         public bool AttributesExist(string rAttributeIDs, bool rRequireAll = true)
    14.         {
    15.             var ids = rAttributeIDs.Split(',');
    16.  
    17.             if (rRequireAll) return ids.Any(AttributeExists);
    18.             return ids.All(AttributeExists);
    19.         }
    20.  
    21.         public T GetAttributeValue<T>(string rAttributeID)
    22.         {
    23.             if (!AttributeExists(rAttributeID)) return default(T);
    24.             var converter = TypeDescriptor.GetConverter(typeof(T));
    25.  
    26.             if (string.Equals("HEALTH", rAttributeID, StringComparison.OrdinalIgnoreCase) &&
    27.                 converter.CanConvertFrom(typeof(int)))
    28.             {
    29.                 return (T)converter.ConvertFrom(CurrentHealth);
    30.             }
    31.  
    32.             return default(T);
    33.         }
    34.  
    35.         public T GetAttributeValue<T>(string rAttributeID, T rDefault)
    36.         {
    37.             if (!AttributeExists(rAttributeID)) return rDefault;
    38.             var converter = TypeDescriptor.GetConverter(typeof(T));
    39.  
    40.             if (string.Equals("HEALTH", rAttributeID, StringComparison.OrdinalIgnoreCase) &&
    41.                 converter.CanConvertFrom(typeof(int)))
    42.             {
    43.                 return (T)converter.ConvertFrom(CurrentHealth);
    44.             }
    45.  
    46.             return rDefault;
    47.         }
    48.  
    49.         public void SetAttributeValue<T>(string rAttributeID, T rValue)
    50.         {
    51.             if (!AttributeExists(rAttributeID)) return;
    52.             var converter = TypeDescriptor.GetConverter(typeof(T));
    53.  
    54.             if (string.Equals("HEALTH", rAttributeID, StringComparison.OrdinalIgnoreCase) &&
    55.                 converter.CanConvertTo(typeof(int)))
    56.             {
    57.                 var convertTo = converter.ConvertTo(rValue, typeof(int));
    58.                 if (convertTo != null)
    59.                     CurrentHealth = (int)convertTo;
    60.             }
    61.         }
    62.  
    Which is a lot of code for something that really only handles the string "Health" and ignores everything else. It's a weird interface to implement too because interfaces are supposed to sort of be a contract on what they can do; this makes it seem like in order to properly implement it, you need to be able to handle requests for converting any sort of type into any other sort of type, like returning health as a CapsuleCollider if that's what the user asks for, which is silly. Both sides, the caller and the callee, both know that health is a float, so they shouldn't have to jump through so many hoops.

    That's my main concern. If someone wants to use MotionController as the basis for their whole RPG, then it might be fine to write the attribute system however you like, but if they want it to plug into their existing game, I think interfaces are a much better way to go than making everyone convert all their existing classes into things that take strings and return unknown typed variables... the only way anyone would know what type you want them to return you for any given stat, or know what stats they're even supposed to include, they'd need to scour through your existing code. Or read docs, but who does that? :p Doing all this string-checking and boxing/unboxing of base types is a lot slower than just using interfaces too. I mean, basically, you ARE defining an interface with properties, it's just instead of having the types and variables names in an interface, you're making the user enter them as type-converters and strings.

    Anyway, those are just my thoughts. I don't want to sound like a jerk; I LOVE the Motion Controller; it's made my life a lot easier. :)
     
    recon0303 likes this.
  19. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I believe Teagans Dad has, check back a few pages, I think it was him or someone else that has been on the forums for a long time.. Ugh sorry for get names, but remembering seeing someone talking about this...But its an animation so shouldn;t be an issue........I use custom animations and with no issues, I also use my own custom AI, inventory, no real issues. Its only a controller folks. So shouldn't present any issues. Just saying.
     
    TeagansDad likes this.
  20. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I agree as I love using interfaces for stuff like this, and for someone who is making a certain game that would be fine.. I think the issue is for Tim and correct me if I'm wrong, it also matters as he has to keep it generic for all sorts of set ups as not every person will have the same set up or attributes in there game. This makes it harder for Tim, as he needs to keep it that way... I personally can see all the issues that can happen, since he is NOT coding just for one game ...But all peoples needs really.. Which can't be easy. Reason I refuse to sell my code assets. Ugh, the support, much respect to you Tim.:)
     
    Tryz and TeagansDad like this.
  21. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Also, just to give an example of integrating with an existing game... I probably would not use any of those things except tags because I have my own combat system and enemy AI. If I were to use the Spell Pack, I'd mostly just want a bunch of motions for casting spells and being affected by spells, but I don't need any sort of mana or spell resistance system. I'd just want a way to trigger a spellcast (your input action system's great for that) and a way to receive a message when something's hit by a spell like OnHitBySpell(SpellHitMessage rMessage) that has all the info about the spell and the hit location, etc. And a way to easily trigger the reaction to being hit, so that I could just activate the "Sleep" or "OnFire" motion whenever I feel like it without needing to implement a bunch of attributes.

    Including an optional ready-to-go RPG stat system for those who want it as well is great, but not at the expense of making integration a pain in the butt. ;)

    Also, I just went through myself and added an IDamageable interface:
    Code (csharp):
    1. namespace com.ootii.Actors.LifeCores
    2. {
    3.     public interface IDamageable
    4.     {
    5.         bool OnDamaged(CombatMessage rMessage);
    6.     }
    7. }
    and had IActorCore implement that instead, and then changed all the places that called IActorCore.OnDamaged to call IDamageable.OnDamaged instead, and it's working like a charm so far. I changed it to take a CombatMessage instead of an IMessage because there was only one place when it wasn't using a CombatMessage and it doesn't make sense for someone to call OnDamaged with anything that's not a DamageMessage anyway. I'd imagine spell pack probably has other types of DamageMessages so in that case you'd probably want OnDamaged(DamageMessage rMessage) instead.
     
  22. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I agree keeping it generic's important, but interfaces would basically do the same exact thing that AttributeSource is doing without all the extra fluff. For example, interfaces IHealth { float Health; } and ISpellResistances { int FireResist; string MagicWords; } are the same as having three attributes for those, just easier to implement.
     
  23. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    955
    @recon0303 is correct; I've got sets of motions for both Sword Animset Pro and Sword & Shield Animset pro. The basics are done, but I have a fair bit of polishing to do before submitting to the Vault. Send me a PM if you're interested in testing these early versions for me.
     
  24. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    [I truncated to keep this from dragging out] ;)

    I'm glad you have a solution that works for you.

    I like the IDamagable interface and will integrate that into the IActorCore, but I also think allowing for unknown attributes (and types) is the right thing to do.
     
    Last edited: May 8, 2017
  25. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I agree I love using Interfaces and do all the time, but where does end? I think is the issue. I'm agreeing with you. but I also agree with what Tim is doing. So its a catch 22 here..

    What you did there is kinda what we do. So it works great you got it going.

    PS: With assets if I dislike code or UI which is alot of them I just change it. Some of the inventory and damage stuff I change with writing my own interfaces . 85% of asset I use, I end up rewriting, or changing some of the UI in general as some of them drive me insane. Anyways. Its impossible to please everyone is my point.. Glad you got it working. .cheers.
     
    Last edited: May 8, 2017
    Tryz likes this.
  26. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    sounds good to me. :) I see what he meant, but I also seen your end to. So I think that is a great solution. I personally made my own damage . etc as I didn't need alot of that unneeded code either, but this will happen with assets regardless as you have to cover all needs:).
     
    Tryz likes this.
  27. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    No problem, sometimes I get a little carried away. ;) All of your stuff's pretty modular anyway so tweaking a few things here and there is not a big deal. Having IDamageable so that objects can receive hit messages without needing to be full blown actors with stats will solve most of my problems. For example... letting me KILL A TREE WITH A LIGHTSABER :eek::eek::eek:
    treecut.gif
     
  28. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    hahahaha... that's awesome. Unless, of course, you're the tree. :D
     
    recon0303 and makeshiftwings like this.
  29. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    lol
     
  30. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    770
    Should have posted this 4 days ago. ;) Another happy uNature user?
     
    TeagansDad and makeshiftwings like this.
  31. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Yeah I actually made the lightsaber for this Facebook post on May the 4th, but ended up leaving it on since then because it's more fun than debugging melee combat with a dumb old non-laser sword. ;) I haven't tried uNature; I wrote my own version of interactable trees.
     
    Tryz, FargleBargle and TeagansDad like this.
  32. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
  33. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    ya Unature has not made anything really special for Trees yet, its mainly about grass, he plans to work on trees later. I tested this for mobile sadly its broke. Great developer though, I been a tester for it for awhile. I plan to use though for my new PC game.

    @ Tim cool, another Android game, like seeing other mobile devs using MC. Thought I was one of few . Glad to see more of us.
     
    Tryz and makeshiftwings like this.
  34. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    This is just too good not to share!

    @TeagansDad decided to create a new spell during beta testing:

    ootii's Irresistible Dance



    hahaha... good times... good times... :)
     
  35. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    looks like could be a good emote .
     
    Tryz likes this.
  36. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    770
    By the way, the Spell Casting Motion Pack is coming along nicely. A few of us have been testing early versions, polishing any rough spots, and adding a few new spells. Tim's got most of the docs done, and is really just adding icing to the cake at the moment. The pack looks solid. It comes with lots of useful spells out of the box, and a node based editor that lets you add more. Since it's modular, with the motions, spell recipes and effects all separated, each element can be mixed and matched, or replaced with your own if you want. I went into testing thinking I didn't really need magic and spells in my current game, but after using it a bit, I can see lots of possible applications already, even in a mainly non-fantasy game. If you've been looking forward to this pack, I think you'll find it well worth the wait. :D
     
  37. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    Too funny. I'm an old school AD&D gamer so I totally get this.
     
    Tryz and TeagansDad like this.
  38. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    299
    Hi Tim

    I have a question about setting up the swimming pack to work with Ceto.

    I'm trying to set it so that the player responds to a collider attached to my Ceto component but I am unable to get this to work for some reason.

    https://www.dropbox.com/home/Public?preview=Ceto.JPG

    If I attach a Plane (Mesh Filter) and mesh collider to an empty object and set the height to a similar level as Ceto it works but the player doesn't respond to the ebb and flow of the waves.

    https://www.dropbox.com/home/Public?preview=Plane.JPG

    I'm not sure why it works with the Plane collider mesh and not the WaterBasicPlane mesh. Is this something that should work or is Ceto somehow different because it is generated?

    Thanks in advance

    Nathan
     
  39. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    770
    I don't know if Tim has much experience with Ceto, but I've used it quite a bit. It creates displacement using a projected grid, based on continuous calculations. Because its shape is not static, you can't accurately model it with colliders, and calculating a dynamic collision matrix would be computationally expensive. This same restriction is present in other water assets that use displacement, like Unity's Water 4. The only way for your player to be affected by wave motion is to calculate his center of buoyancy relative to the instantaneous surface height at his position, and apply physical forces to a rigid body. In other words, use a buoyancy script. This falls outside the scope of the Swimming Pack, which uses a much simpler static collider based system to detect the water's surface.

    In my experience, this isn't so bad, as long as you keep the wave size reasonable, but don't expect wave physics to accurately apply to any swimming characters. :rolleyes:
     
    Dwight_Everhart and Tryz like this.
  40. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    299
    Thanks @FargleBargle

    This makes sense. Thanks for your detailed response.

    I guess dropping the size of the waves is the first step ;)

    Thank you
    Nathan
     
    Tryz likes this.
  41. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    770
    You don't need to completely eliminate them. Just keep them a reasonable size, something you'd want to actually swim in. If you think about it, big waves are going to wash over you anyway. Real swimmers don't bob up and down like corks in big waves, they drown. You just need to find a compromise that looks OK. Here's a sample video showing my MC character using the Swimming pack in a Ceto Ocean:

     
    Dwight_Everhart, TeagansDad and Tryz like this.
  42. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    Unfortunately, @FargleBargle is exactly right.

    Damn that looks good! :eek:
     
    TeagansDad and FargleBargle like this.
  43. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    955
    It looks very good swimming in a Suimono ocean as well. Don't have a video unfortunately, but I can testify that it works very, very well.
     
    Tryz likes this.
  44. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    Does anyone know of any instructions on how to get AI Warrior working with Motion Controller? I know the author supports MC, but he is unavailable to help due to personal reasons and I can't find any information in the documentation or video tutorials. So I thought someone here might have got it working together.
     
  45. nickarthur

    nickarthur

    Joined:
    Oct 3, 2016
    Posts:
    1
    I am am getting into using ootii MC and would love to use the Female MAP. I was hoping that I could just follow the MAP instructions and somehow swap in the Female MAP animations into the Sub State Machine. So this would be a great help!
     
  46. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    770
    As one of the original testers, I'm using AI Warrior with Motion Controller and the Sword and Shield pack. I can't remember having any serious issues, once Kuro addressed a few initial beta concerns. If you follow his guide and the tutorials on the first page of his forum thread, most of it should just work. After that, it's just a matter of refining which effects, sounds, props, animations, and other assets you want to use with it. Here are some of my original testing notes:
    1. Make a fully working MC character, with S&S, first, that can enter play mode and do all that it should. You'll need to add the Player_Main.cs script, from the Ai_Warrior_kuro>AddOns>PlayerSystem_AI_Warrior folder to your MC character, along with a capsule collider. This allows damage and other data to be received from AIW.
    2. Drop the SwordHelper_AI_Warrior.cs script or the SwordMultiTagHelper.cs script from the AI Warrior>AddOns>Motion Controller folder onto the sword (with the swordcore.cs script on it), along with a rigid body and collider. These allow you to damage AIW characters.
    3. Check the Debug to console box on SwordHelper.
    4. Add the PlayerHudGUI, ShooterEmptyPlayer, and EventSystem to your character. These I mainly just copied from players in the demo scenes. You can also add the Radar screen from the AddOns section if you want.
    5. Play, hit things with the sword, and check the console for errors. If it all works, try taking on one of the AI enemies.
    Fortunately, there are wizards to handle much of the setup, along with a fairly thorough manual, explaining the setup and many of the options. Much of the rest can be determined by looking at the player setups in the demo scenes. If you have any specific questions once you get started, I'll try to answer them in Kuro's absence. just tag me in the AIW forum. :eek:
     
    p_hergott and Tryz like this.
  47. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    Thanks very much. Steps 1 and 2 were all that was really needed to get it working. I couldn't find that information anywhere in the AI Warrior documentation. I really appreciate the help.

    [EDIT]
    I spoke too soon. I guess it needs those UI elements to avoid some index out of range issues. Also, just realized that when my player hits an AI Warrior enemy that the attack sends the enemy flying through the air. Cool, but a bit much so I must need to tweak some setting to fix that I suppose.
     
    Last edited: May 11, 2017
  48. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    @FargleBargle I have 2 issues remaining with AI Warrior integration. Using the demo scene as a base, if I leave the enemy AI exactly as they are then the game uses the enemy's Eyesight Camera to view the scene instead of the CameraRig from MC. I deactivated the Eyesight cameras for the enemies to solve this, but I'm thinking that's probably not the correct solution. Second, I have the issue where when the player strikes the enemy then the enemy goes flying through the air. Any ideas how to solve these?

    [EDIT]
    Actually, only one of the enemies in the demo scene goes flying through the air when hit. The other one continues to stand and fight just fine. So it must be some sort of enemy setting.

    [EDIT 2]
    Found the knock back settings that were causing it and fixed it.
     
    Last edited: May 11, 2017
  49. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    @Tryz Quick suggestion. I know animations are replaceable, but there's one animation in the Sword & Shield pack that just needs to go. lol. One of the attacks is just a little flick of the sword that doesn't even do any damage because it never hits due to the fact that it barely extends the sword. It's frustrating to be battling an enemy and suddenly the player just does a half-hearted flick of the sword to no effect. I'm ultimately replacing most animations and adding more, but that one has just been nagging at me for a while.
     
  50. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,399
    It's probably the Pommel Bash. I was trying to have something that worked close quarters.

    Go to your PSS - Basic Attacks motion and remove it from the Attack Styles. Then, it won't happen.