Search Unity

Motion Controller

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

  1. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Hi Tim,

    One more question. Is there any way to change the players walk/run speed based upon the surface material the character is on? Obviously having something to impede the charcter while walking through water is the most obvious but we're working on a landscape right now that is quite marshy so the ability to "bog" them down a little would be great.

    Sorry if there is a way to do this, I haven't been able to find it yet.

    Thanks again!

    Nathan
     
  2. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    There's nothing in the MC that does this automatically, but you do have access to the motions. So, you could manage that yourself.

    You've got a couple of options:

    1. Use your own animations to create a WalkRunTrudge motion for that impeded walk.

    2. Grab the WalkRunX motion that you're using and change the "WalkSpeed" and "RunSpeed" properties when needed.

    3. Tap into the OnPreControllerMove event that is on the Actor Controller. That allows you to modify the final frame movement and rotation before I apply it to the character's transform.

    #1 is the best because you won't have skating going on when your animation and movement are out-of-sync (like you will with #2 and #3).

    I hope that helps.
     
    kurotatsu likes this.
  3. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    Rather than posting the code here, I decided to just package up my "motion pack" for Movement Animset Pro and send it off to Tim to share it on the Motion Vault (assuming it checks out). Currently, it only contains the Idle and WalkRunPivot motions for both the MAP and FMAP animation sets, plus a few support files (abstract base classes).

    For the (MAP) Idle motion, I've set up the animator sub-state machine like this:



    The IdlePose at the center is an animation take of the first frame of the Idle animation (if using MAP, the package I submitted includes the .meta files for the animation files with this already set up). When an idle animation finishes playing, the motion generates a new random value that is used as an L0MotionParameter in the transitions out of IdlePose. By default, I have the random number being an integer from 0 to 15 so that I can weight certain idle animations higher than others; in this example the basic Idle state is run when that parameter is greater than 7 while an animation where the character scratches his head only runs when that parameter value is 5.

    Currently, the range of the random number generator is hard-coded; I might move it to a configurable property at some point.

    I do have a property called RandomSpeedFactor that will set the animator speed to a random percentage within specified limits, the default being +/- 15% (so 0.85 to 1.15). This number is generated every time the motion activates. I do this in order to prevent characters from idling in perfect unison with one another, as that looks really strange when it happens. (Of course, the animator speed is reset back to 1 when the motion deactivates)
     
    hoodoo, hopeful, Tryz and 1 other person like this.
  4. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    Also, I'm currently working on adapting the Sword & Shield Motion Pack to use Kubold's Sword & Shield Animset Pro animations (SSAP). I've got the basics done already, but it needs more polish. There are a few spots where I'm still using the Mixamo animation clips and I still need to tweak how those blend into the SSAP animations. I also had to use a couple of animations from Kubold's Sword Animset Pro package to fill in some gaps.

    So if anybody else is planning to use those animation packages, let me know so that I can have a better idea as to how other people intend to use them. :)

    I've also built a set of motions for SF Bay Studios' Serpent Warrior, based on the SSMP motions. Still working the kinks out of this one, but it's coming along nicely. Will post a video once I get it working fluidly.

     
    hoodoo, kimsama, christougher and 2 others like this.
  5. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    And my MAP motion pack is up on the Motion Vault. I've called it v0.1 for a reason. ;)

    I didn't write up a proper readme for it yet; I think the only potential gotcha here is that you need a 1 frame IdlePose animation created from the first frame of the basic idle in each animation package (MAP and FMAP). You can create it yourself, or you can grab the .Meta files from the zip file included in the package. Eventually, you'll need to just use the meta files, as I'll likely need to modify the animations when I tackle the Jump motions.

    And of course you don't need the animations if you just want to see how I coded the random idles. You'll need to look at both IdleBase and either MAP_Idle or FMAP_Idle to get the full picture. I think I commented all of those lines.

    Oh, one other quick note: the FMAP doesn't have any running pivot animations, so I used the MAP ones with longer transition times. So if you only have FMAP and not MAP, you'll need to sub in another animation.
     
    Last edited: Feb 14, 2017
    hoodoo, kurotatsu and Tryz like this.
  6. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Dude! I had picked up the SSAP package when it was on sale a while ago. This is awesome! Thanks for sharing.

     
    TeagansDad and Tryz like this.
  7. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    154
    Thank you for sharing all of this, it's much appreciated. I'm taking a look at Kubold Movement Animset Pro as I wasn't familiar with it - I may need to pick up this package as well. I'm not sure what FMAP is?
     
  8. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    You're welcome!

    FMAP would be Female Movement Animset Pro.

    Kubold's animations are generally regarded as the best available on the Asset Store. He's a professional animator with a lot of experience in the games industry. They're definitely worth picking up.

    @christougher - I just picked up SSAP in that recent sale as well. I've had SAP for a while and I'd been hoping that SSAP would go on sale before I got to the point where I absolutely needed it.

    There is also a relatively recent release, Two Handed Sword Animset Pro. It's not from Kubold, but from someone called Riko whom I assume is a colleague, as both of them worked as animators on The Witcher 3. The reviews state that they fit in perfectly with Kubold's animations.

    I haven't purchased it yet, but I wanted to draw attention to it, as it looks like an excellent set of weapon animations.
     
  9. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    How about to add Category attribute to each of MotionControllerMotion derived classes?

    Code (csharp):
    1.  
    2.     [Category("PSS/Basic Attacks")]
    3.     [MotionName("PSS - Basic Attacks")]
    4.     [MotionDescription("Basic sword attacks using Mixamo's Pro Sword and Shield animations.")]
    5.     public class PSS_BasicAttacks : PSS_MotionBase
    6.  
    I added several packages such as Sword&Shield pack, SwordAnimSetPro motions and so on and then the track menu on the motions page in the Inspector view has too many items even in one column.

    It would be more convenient if it pop the track menu and show hierarchically sorted items based on each of motion's category.

    I mean in a similar way what Node Canvas shows its sub category nodes when we add a new node of a behavior tree.
     
    Tryz likes this.
  10. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Agreed. Unity's default pop up worked for a while, but as the list grows it's not convenient.
     
    kimsama likes this.
  11. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    Hope so that feature can be adopted with coming update.

    Cheers,
     
  12. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    In the meantime, if you name the motions in the form "SSAP/Idle" instead of "SSAP - Idle" then you'll get a single "SSAP" item on the pop-up with a second pop-up cascading off to the right, containing "Idle", "Equip", etc.
     
  13. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Tip of the day! I didn't know that.

    That would be easier and clean.
     
    TeagansDad likes this.
  14. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    And another question.

    How can I do for a multiple action alias?

    For an example, in Dark Soul, a player can kick action with input 'forward + L1' with Xbox controller.

    But 'Action alias' for Motion Controller only allows a field of Unity's input alias.

    Is there any nice approach to do that?

    Though with a quick thought, it could be quickly done with Rx's Subject<T>. Just my opinion. :)
     
  15. webgrapx

    webgrapx

    Joined:
    Jul 21, 2015
    Posts:
    22
    [Quote = "Tryz, de la publicación: 2958808, miembro de: 257420"] [USER = 891746] @webgrapx [/ USUARIO]

    Si no se encuentra el jugador, entonces el MC no debe haber sido importado correctamente. Ese carácter se utiliza en casi todos mis bienes.

    Tengo un video que muestra conseguir el paquete de la espada y del escudo de movimiento en marcha y funcionando. Es más o menos lo mismo con natación y tiro con arco:
    [MEDIA = youtube] 1AmQ7yEbLBQ [/ MEDIA]

    Estoy realmente sólo ir a través de los pasos en la Guía del usuario. Por lo tanto, si se sigue que, se le multa. [/ Quote]

    Thank you very much, everything goes to perfection !!!
     
    Tryz likes this.
  16. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    You would do that with an advanced input solution or write your own Input Source.

    The action alias is a nickname. So "Jump" can be triggered by whatever you want. In my updated video on Input Sources, I talk about a jump that only happens on Tuesdays (14:01).



    Most input solutions on the asset store support multiple button presses. With Easy Input for example, "Jump" could be "left shift + space". I'm sure the other assets do too.
     
  17. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    I got it.

    Thank you.
     
    Tryz likes this.
  18. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    I discovered it completely by accident; I hit the "/" key when typing a motion name and didn't notice. :) So it had a really weird split... But I started using it deliberately to keep the drop down manageable. Especially if you have a set of motions for each creature model. The list gets really unwieldy at that point.
     
    hopeful and Tryz like this.
  19. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Thanks Tim,

    I was kind of thinking this would be the method. I'm still getting my head around your suite of assets so this is extremely helpful.

    Thanks again, and thanks for the updated videos!

    Nathan

     
    Tryz likes this.
  20. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Today the Archery Motion Pack is on sale... and so is the Motion Controller!





    * MC sale will end tomorrow with the Archery Motion Pack sale
     
  21. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    nice, great timing for archery motion pack sale :D -instant purchase.
     
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I finally had some time last evening and I was able to get the first half of an integration working with ICE Creature Control. I'm now able to damage and kill ICE NPCs by just attaching a simple ICEActorCore script to them. Now to work on getting ICE creatures to damage the MC player and I'll be all set.
     
  23. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Both are well worth their FULL price! If you have been on the fence about getting either one of them (or both), I highly recommend you grab them. The attention to detail and level of support Tim provides is outstanding. And the new motion packs are awesome ways to leverage the foundation of the MC with existing animations! Win win.. And then a sale? Add another win! :p

    Thanks for the awesome work Tim! :)
     
    Malbers, Tryz, TeagansDad and 2 others like this.
  24. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Simply awesome! I can't wait to see this in action. :)
     
    kurotatsu likes this.
  25. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Thanks :D

    I must admit, it's easy to love what you do when you're shooting arrows and casting spells.
     
  26. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Just picked up the Archery Pack. Thanks Tim.:)

    I'm not quite ready to use it in my game yet, but like the Sword & Shield pack, I'm sure it will prove useful at some point, so I'd be an idiot to pass up a deal like this. I also know that when the time comes it won't disappoint, so I'm looking forward to trying it out. :D
     
    Tryz and kurotatsu like this.
  27. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    154
    Just purchased the Archery Pack myself - was excited to see it on sale. Now I have MC with swimming and archery! Thanks :)
     
    Tryz, kurotatsu and hopeful like this.
  28. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi, I would like to know if this controller compatible with your Camera Controller? For I need 3rd person AND 1st person view both in my game, so wonder if I can use this controller for both purpose.
    And another question, does this pack contain any other fighting animations like sword and shield, archery inside? Need to figure out if I have to buy other packs cuz your packs all look amazing!
     
  29. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    It's absolutely compatible with Camera Controller. In fact, I'd strongly recommend getting Camera Controller as well if you really want to make the most of Motion Controller. Camera Controller includes different "camera motors", which are basically camera presets, behaviors, and transitions, that can be accessed as needed. By changing camera motors in game, you can go from Third Person to First Person, or create custom views, for aiming or scopes for instance.
    The core Motion Controller package provides basic locomotion, jumping, and climbing, plus a framework to add any other type of motions that you wish. If you don't want to create these additional motions yourself, the motion packs add specific categories of motion to the base set. So you can add swimming, archery, sword fighting, or magic spells, depending on what you need, with more packs to come. These motion packs also include extra "abilities" where applicable, like inventory management, targeting, and combat, when you start using weapons, and custom spell creation, when the magic pack comes out, so they add a lot more than just the motions themselves. The great thing is they're all modular, so you can pick just the ones you actually need, and they're all designed to work together, so no worries about compatibility. :)
     
  30. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    That sounds great. since I'm making a hardcore survival game, will need realistic crafting motions based on different crafting techniques, you can see our game's trailer here, there are some crafting poses:

    As you can see, they are a bit rough. So I'm wondering if you can make a crafting motion pack or even a system that I can use?
     
    Malbers and kurotatsu like this.
  31. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Also, check out the Ootii motion vault. Got some high quality freebies here....
    http://www.ootii.com/UnityMotionVault.cshtml

     
  32. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    @Harekelas , FargleBargle's response is exactly right. He's been a beta tester for a while and knows his stuff.

    @FargleBargle , you rock! I couldn't have responded better. :D
     
    TeagansDad likes this.
  33. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    The video looks good. I thought the building system looked pretty polished.

    I do have crafting motions on my list, but it's pretty low on the list. That means if I get to it, it probably won't be for a long long time. :(
     
    BackwoodsGaming likes this.
  34. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Tim
    I am new to your forum but have owned your Character Controller for some time now, yesterday I purchased the archery pack and am quit pleased with it so far. I have managed to get my own character into the AMP-Demo scene and have her moving around ok and shooting the arrows my problem is adjusting the Bow position and rotation, I do understand it is modified on the prefab for the recursive Bow under Bow Core. Is there a way to adjust either position and rotation in run pause mode so I can see what parameters affects the location of the bow while not in full screen mode?

    The other question I have is I have tried to get Final IK working with your Character Controller so I can use Final IK to pick up objects , carry objects etc but haven't got them figured out yet.............I have managed to get Puppet Master working per the example but not Final IK itself. Have you or anyone used Final IK and your Character Controller together and can give me some clues?
    Thanks in advance
    Ron
     
  35. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey Ron,

    You can. What I do is at edit-time I add an instance of the bow to the left hand. Then, I rotate and move the bow to get the look that I want. It's those transform values that are then used in the Bow Core properties.

    You can run it from the edit mode, pause, and do the adjustments there too. You're just copying the transform values over.

    I haven't used Final IK myself, but I have used the Bone Controller. Like the BC, I believe Final IK just modifies the bone rotations after animations in the Monobehaviour's OnAnimatorIK() function. So, there shouldn't be an issue.

    The MC is simply using Unity's animation. That means the flow is Unity's generic flow and IK wouldn't be prevented.

    Unfortunately, I don't have any direct experience with it. :(
     
  36. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Thanks for the quick reply time I will see if I can figure it out per your input .............
    PS Tim I am almost 70 years old so I may not catch on as quickly as some other user !!
    I also want to modify the mount position of the bow when the user unarms the bow and places it back on the players back instead of having it turn off from view...........as in a carry bow on her back.
    Thanks for the help
    Ron
     
    Malbers and kurotatsu like this.
  37. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    hahaha... I'm 47 and feel the same way. :)

    I don't think I talk about this much, but totally doable. Do the following:

    1. In your scene, add the RecurveBow prefab to your character's back or spine bone. Then rotate and move it how you like it. This means it will be visible in the editor before every playing.

    2. In the Basic Inventory, there is an "Item" called "Longbow_01". If you look at the properties, the "Instance" property will be empty. Drag your instance of the bow (from the Hierarchy list) to that slot.

    Now, when your character draws the bow, he'll detach it from the back/spine bone and use it. When he sheathes it, he'll put it back on the back/spine bone.
     
  38. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Tim
    I ran the Demo with my character but not in full screen mode, pressed 2 key to arm the character with the bow selected the characters bones in the Hierarchy Tab paused play adjusted the transforms copied the position and rotations of the Recusive Bow in the left when armed, entered that transform data to the prefab Bow Core transforms in edit mode.
    The bow carry positions are much better now and aiming seems more realistic also.
    Thanks
    Ron
     
    hopeful and Tryz like this.
  39. reocwolf

    reocwolf

    Joined:
    Aug 1, 2013
    Posts:
    182
    Would you consider spells that acts like the flamethrower, cryo, singularity or drag? (3:10)

     
  40. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    I've finished the WalkRunStrafe motion for both MAP and FMAP and I've got Jump, Running Jump, and Fall working for both. Just need to polish those ones some more. I'll try to send an updated version of the package to Tim by the end of the weekend so that it can go up on the Vault.

    Also, I did variant WalkRunStrafe and Idle motions that require both MAP and FMAP packs; I've got them blending the male and female animations together based on a "Femininity" 0 to 1 float value (configurable on the Idle motion). It's a nice way of getting some variation in the walking animations. WalkRunPivot will be trickier, as the various pivot and idle-turn animations don't seem to work when together in a blend tree. Probably just use either the male or female animations for those, based on whether that float value is greater than or less than 0.5.
     
    kurotatsu, BackwoodsGaming and Tryz like this.
  41. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    (Ignore my previous post... I was confused. hahaha)

    Yes, yes, yes, and yes.

    That's actually a great video to reference. I think the spell system will work great for "tech" like this.
     
  42. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
     
  43. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Thanks Tim that worked perfect
     
    kurotatsu and Tryz like this.
  44. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Hi Tim,

    Wouldn't you mind to add an URL to the Vault on your webpage as well. Tried to find it but had to look into the Unity forums to find the actual link.

    Thanks,

    Wim
     
  45. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Done. I'm a much better coder than I am a marketer. :)
     
    uni7y, BackwoodsGaming and TeagansDad like this.
  46. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    It's there.. It is at the bottom of the Unity Assets page underneath all the assets.. http://www.ootii.com/UnityAssets.cshtml
     
    Tryz likes this.
  47. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Great! Will definitely shorten my searches for it in the future. Thanks!
     
    BackwoodsGaming and Tryz like this.
  48. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    lol... How did I miss you posting this? lol.. Wasn't it at the bottom of the assets page before? *scratches head* heheh
     
    antoripa and Tryz like this.
  49. DanielKW

    DanielKW

    Joined:
    Nov 11, 2014
    Posts:
    38
    @Tryz I have successfully installed the sword and shield pack, however when the demo starts i can move jones 1 step and he stops moving and just walks on the spot.

    To actually get him to walk with the sword out, I have to tab the direction keys (WSAD), otherwise it's fine.
     
  50. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey @DanielKW ,

    I just downloaded and imported the latest MC and SSMP and I'm not having that issue with the demo_Combat demo.

    So, I'm thinking there's something wrong with your project or setup.

    1. Did you try this in a new project or are there other assets in the project (if so, what others)?
    2. Is his walking animating in-place before you draw the sword & shield, after, or both?
    3. Is the NPC walking towards you or is he walking in place too?
    4. What input solution are you using?
    5. If you open the MC's "MC_Simple" demo is the same thing happening?

    These questions may help narrow down your issue.

    No one else has reported this either. So, I think we're dealing with something specific to your project.