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

Motion Controller

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

  1. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Good question (and thanks ;))!

    These were the issues on my list for MC:

    1. On a rare occasion, the character tilts when on a slope.
    I was able to reproduce it once, but haven't been able to reproduce it again. I know the issues is there, I just can't reproduce it to figure out if it's in the Motion Controller or the Unity Character controller. This one has been haunting me for weeks.

    2. Stopping on a tiny gap causes floating.
    fixed, but somewhat dependent on character setup (ie step-height)

    3. Support for pausing (Time Scale == 0)
    fixed

    4. Bug in Behavior Designer actions
    fixed

    5. Update to Behavior Designer code for U4.5 'tooltip' issue
    fixed



    I haven't pushed them out because I kept trying to fix #1. I probably need to just get the fixed ones out. If you shoot me an email, I'll reply with a version you can test (especially #2) and then get this out knowing #1 is still sitting out there.


    #2 has the character go into the idle pose, but you can control him as expected. That said, it can look a bit odd...


    But there isn't much I can do about this. I believe this one will come down to level design.

    Based on the step-height and skin widths, he will consider himself grounded. Unfortunately, in this case he can't move forward and he simply can't sink down because of the capsule collider radius. We could do some tricky things with multiple colliders, but I think that would get nasty and just get the character stuck.
     
    Last edited: Jun 24, 2014
  2. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    hi what's the dif with adventure package ?
    and any mobile control on the way ? please
     
  3. Tryz

    Tryz

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

    The 'Adventure Camera & Rig' is a camera that mimics Tomb Raider's camera. It's built for 3rd person games. It also includes a character controller, but it's not as advanced as the Motion Controller.

    The Motion Controller is a character controller (that can be used with the Adventure Camera) and supports "motions" like climbing, sneaking, jumping, etc. It's built to allow people to create their own motions and plug them in.

    Hope that helps.


    Forgot the mobile part... I know people are using the camera and controller with mobile. However, they've implemented their own input controls. Unfortunately, I don't plan on doing that as part of the package itself.
     
  4. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Ok nice thank's and i'am maybie interessed so how it's work for exemple if i want play middle kick i just set the motion on it
    and it's happen somethink's ?
     
  5. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    There's two ways you can cause motions to happen:

    1. Add code to your motion in the TestActivate() function. If you do this, your character will automatically start the motion when the function passes all the tests. For example, I have tests that determine if you're falling. The character will go into the falling motion automatically.

    2. Force a motion to activate with MotionController.ActivateMotion(<motion type>). In this way, you can simply force the motion to play whenever you need.

    For most motions, I use #1 and tie input controls to them. For example, when space-bar is pressed the jump occurs.

    #2 is handy with AI. I've created some behavior tree nodes for Behavior Designer that can kick off a motions based on the flow of the tree.
     
  6. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
    At the moment we are prototyping our game with a capsule and unity's character controller/physics, once we are done and ready to add an avatar/animation controller how would we go about doing so with ooti motion controller?

    Edit: It seems that each movement behavior should be separated into its own motion script to function with ooti motion controller?
     
    Last edited: Jul 16, 2014
  7. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    This happens for me when I have a collider that the character is on top of that tilts to the point that the character falls off due to gravity. The character then stays in that tilted position. Not sure if that helps, but it's very reproducible - collider cube, character on top, tilt cube.
    On another note, this is a great system. Thanks for creating it!
     
  8. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Same here, when my ninja slashes things and then walks on the pieces. It would be great if we could constrain the y axis somehow.
     
  9. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Sorry for the delay in responding. For some reason I'm not getting email notifications for posts like I used to.


    Hey SOLO:
    Correct. Each motion is a separate script that is then assigned to the actor's Motion Controller. This way, you can use the same 'forward' motion for all actors, but a different 'idle' motion for each actor type if you need to.

    It also allows for some independence as you're creating new motions. Meaning you don't need to worry about how the 'idle' or 'forward' motions work if you're creating a 'crouch' motion.


    Hey IFL and Kurotatsu:
    Thanks for the kind words. :)

    I've been able to reproduce it, but not consistently. At this point, I'm not sure if it's an issue with the Motion Controller or Unity's Character Controller (which the MC is based on). I've had a bit of a detour, but will get back to working on this.

    IFL, is there any chance you can send me your scene. If I can get this to happen more consistently, it would really help. Feel free to email me at tim@ootii.com.
     
  10. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
    Would anyone here that is experienced with the motion controller be interested in setting my game prototype up with ooti, essentially diving the motions into motion scripts (no animations or animation controller is needed at the moment) - For Payment

    Edit: Though we can work something out if you are interested in setting up the animations also.
     
  11. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Thanks to IFL's great sample scene, I've finally found the issue with the unexpected tilt. It has to do with the platform rotation. I'll get a fix out soon, but if you need to you can simply do the following:

    Open MotionController.cs and go to line 820.


    Replace line 820:
    transform.Rotate(lDeltaRotation.eulerAngles);

    with this:
    transform.Rotate(0f, lDeltaRotation.eulerAngles.y, 0f);


    This will keep the character from taking on the x and z rotation of the platform.

    Thanks again IFL and Kurotatsu for your patience!
     
  12. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    No prob, sent ya an email, I think you'll like.:D
     
  13. StudioTerra

    StudioTerra

    Joined:
    Oct 1, 2013
    Posts:
    7
    My first finished game is going to combine AdentureCreator, BehaivorDesigner, PlayMaker, MotionController, AdventureCamera, SubstanceDatabase, ProBundle, DialougeSystems, Daikon, Score Flash, Shader Forge, all from UMA and Arteria3D, and the list goes on and on, but already a lot is working together.

    Hi eagleeyez,

    the idea of combining Adventure Creator with Motion Controller/Adventure Camera sounds really interesting (i have both assets). Did you get these working together? If so, could you share your knowledge on how you did this?
     
  14. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Very cool Fabula! Looking forward to seeing what you come up with.

    On a side note, I've pushed a new version of the MC to Unity. It will take about 5 days for it to be approved. It has the following:

    07/26/2014: Version 1.24
    - Added support for a re-activation delay on motions
    - Added support for rotating while idle (Casual Idle)
    - Added support for walking backwards (SimpleForward motion)
    - Reset motion priorities when changing priority type
    - Fixed bug with platforms causing the character to rotate on the x and z axis

    * If you are using the Adventure Camera and the Casual Idle motion,
    there is a new property in the Casual Idle motion called 'Rotate With View' that
    you need to disable.

    * If you made changes to the 'Humanoid' Mecanim Animator, back it up! This update will
    overwrite it. In the documentation, I suggest that you use a different Animator for your
    character so that updates like this don't over-write your customization. If you need help, please
    let me know.


    Requests Filled
    I've had a lot of requests for the character to rotate with the camera (when using the Follow Camera that's included the Motion Controller). So, I went ahead and added that.

    Also, having backwards movement with the SimpleForward motion was another popular request. When using the SimpleForward motion, pressing 'S' or pulling back on the controller's left-stick will have the character walk backwards.

    Hopefully this doesn't mess up anyone's existing config. If it does, please let me know and I'll help.

    NPC AI Demo
    Lastly, if you haven't seen, Opsive and I finished the Motion Controller + Behavior Designer demo. It shows 8 goblins walking around, eating rats, sleeping, and going on patrol. This is a great way to see how you can use the Motion Controller with behavior trees to create NPC AI.

    To get the demo, simply download the latest Behavior Designer and check out the 'Goblin Life' sample.

     
    Last edited: Jul 28, 2014
  15. StudioTerra

    StudioTerra

    Joined:
    Oct 1, 2013
    Posts:
    7
    @Tryz
    The text in italics wasn't by written by me, it was from an earlier post by eagleeye. I was curious about his idea about combining MC with Adventure Creator. Haven't looked into combining them myself, but i've got both assets, it would make for an interesting combination.
     
    Tryz likes this.
  16. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    To run that demo, do i have to own and import behavior designer and motion controller?
    I have the behavior designer but not yours and want to see what they both can do together to decide better if i buy yours too.

    What was then the right way to see the demo?
    Meaning do i first load the demo into unity, then the behavior designer, then the motion pack from the behavior designer and then ... yours?

    I think i read that i should at first load the behavior designer into an empty scene or was that for another asset?

    Please help here.

    Edit:
    So i have everything imported into unity but yours but getting some (17) red errors all reading something like this:
    Assets/GoblinLife/Scripts/AI/Behaviors/Conditionals/IsFarAway.cs(3,17): error CS0234: The type or namespace name `Helpers' does not exist in the namespace `com.ootii'. Are you missing an assembly reference?

    Do i first have to buy it to see what it can do?

    Maybe a video on youtube would be easier here.
     
    Last edited: Jul 29, 2014
  17. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi RAndAIThor,

    Unfortunately, you do need to own both solutions. There's no good way of giving out the MC without giving out the code.

    I'll see about getting a video up. Until then, this is a video I did of a similar solution that uses the MC. :)


    If you do own both solutions, you'd download the demo, import BD and then import MC. From there, you'd be able to run it.

    Thanks,
    Tim
     
  18. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Ok,

    just bought it just to see the demo ;)
    Nah, i want it for others things too.

    But after importing it and start the demo i got this error message:

    NullReferenceException: Object reference not set to an instance of an object
    com.ootii.AI.Behaviors.IsPatrolTime.OnUpdate () (at Assets/GoblinLife/Scripts/AI/Behaviors/Conditionals/IsPatrolTime.cs:29)
    BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorTree behaviorTree, Int32 taskIndex, Int32 stackIndex, TaskStatus previousStatus)
    BehaviorDesigner.Runtime.BehaviorManager.Tick (BehaviorDesigner.Runtime.BehaviorTree behaviorTree)
    BehaviorDesigner.Runtime.BehaviorManager.Tick ()
    BehaviorDesigner.Runtime.BehaviorManager.Update ()

    The demo starts but the little green goblins just are sitting there, stand for a short time and then sitting agin.
    Just the rats animate in the far.
     
  19. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    Hey Tim,
    I think you mentioned earlier in the thread that you had tried to get MC in one of the 24-hour deals without success. I think you should really try again, even if it's only for exposure. You could also try posting updates and news on Twitter (@UnityAssetStore). That's all unsolicited advice, but I just got done going through some of your ridiculously-well-written code to see how it works. I'm betting that there are many other devs that would gladly throw money at you if they knew about MC.
     
  20. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Haha! Thanks IFL. :)

    I have requested it to go on sale a couple of times, but no luck so far. Your point about Twitter is great and I'll definitely do that. While my code may be 'ridiculously-well-written', my marketing skills suck. ;)
     
  21. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Ok. At first I had an error, but that's because I forgot to import everything (step 5).

    Here's what I did:
    1. Downloaded the sample from the Opsive site and unzipped it.
    2. Opened the project in Unity.
    3. Downloaded and imported Behavior Designer
    4. Downloaded and imported Motion Controller
    5. Imported Behavior Designer's "Third Party" package for Motion Controller
    6. Restarted Unity for good measure
    7. Ran it

    After a few seconds, the goblins will start digging and some (in the cave) will start walking around. Eventually (after about 30 seconds), a goblin will go on patrol, and some will go eat. Then, they go sleep and start over.

    When I ran it for the third time, I did see two of them eventually just stand there... which is odd. I'll have to look at that.

    If you'll confirm all these steps, I'd appreciate it. Feel free to email me at tim@ootii.com and we'll get it up and running.
     
    Last edited: Aug 1, 2014
  22. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
  23. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey S.0.L.0.

    Unfortunately, I don't get a preview of U5 or any kind of early version. So that means the truthful answer is... I don't know.

    What I can say is that the features I've read about seem to fit well with what I'm currently doing. Meaning tapping into callbacks would be awesome. I'm using the Motion Controller in my own projects and have found that being able to connect the animations and states through code in an organized and consistent way has proven invaluable. For example, I'm currently working on combat with a skills system and skills that hook to individual motions has worked out great.

    So, I plan on continuing to work on the Motion Controller. How that morphs with the U5 features, I won't know until I can actually get U5 in my grubby little hands. :)
     
  24. invadererik

    invadererik

    Joined:
    Oct 31, 2010
    Posts:
    148
    Hey Tim,

    I notice that on your demo : http://www.ootii.com/Unity/MotionController/Web.html
    when you try to do the "PrimaryAttack" ie punch, that on my web player the avatars arms seem to cling to his body instead of doing a punch.

    I am working on adding cover and shooting motions, the new shooting motion is on layer 1 similar to the punch, except with more states, and it looks fine in editor ( same as the punch), but when I build a web player it looks really bad.

    Any idea what is happening here or is this a Unity Mecanim issue ?

    Looks similar to this: http://forum.unity3d.com/threads/mecanim-animator-webplayer-issue.258745/

    He suggests at the bottom that the latest patch release might fix stuff... I will try that and report back

    Update:
    I installed 4.5.2p3 this fixed the problem for me
    Note:
    4.5.2f1 works too... I guess I was on previous version when I tried. oops.
     
    Last edited: Aug 5, 2014
  25. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi InvaderErik,

    Thanks for the update and I'm glad you got it worked out.

    If you have any other issues, please feel free to email tim@ootii.com. I still can't seem to get email notifications from the forum. :(
     
  26. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I thought you might be interested in this...


    Moving into combat, I've had to create several systems: senses, memory, etc. Putting these together with the Motion Controller, I'm able get the combat movement started.

    Like AC:Black Flag, the movement style changes as you get into melee range. This video shows me using two different motions to create the effect.

    1. Normal "Adventure Forward" for running around
    2. "Combat Forward" for continually facing the target

    There are also some improvements to the standard idle pivot.

    I'll be updating the Motion Controller with some of these changes in the near future.
     
  27. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Very cool. That'll be a timely addition for what I'm working on :)
     
  28. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Redhead Robot contacted me about integrating the Motion Controller with his GIANT Cartoon Hero Pack. Definitely a fun little project.

    With his upcoming update, the heroes will be Motion Controller ready out of the box. Just import his heroes and the Motion Controller and you're ready to use the little hero prefabs!

    Here's a great video of them all in action!
     
  29. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,291
    How long will the current 50% offer be available ?

    Also does the system support Legacy animations ?

    Thanks
     
  30. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi Nasos,

    It will be on sale for another 7 days. Then it will go back to $65.

    Unfortunately, the system was built for Mecanim. I haven't tried working with legacy animations, but I don't think it would go well. :(
     
  31. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,291
    Thanks, i can use Mechanim, i just never got to it, will probably be the best anyway ;)
     
  32. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    I hadn't either, but thought the same and you and am intensely glad I did change from legacy to mecanim. The flow of my gameplay has improved drastically.
     
  33. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Just picked this up and after combing over the Goblin Life demo, I'm very impressed with the BD integration. I'm very much now looking forward to you Combat Movement update.

    Btw, and maybe it's just me, but how come all the demo's using WASD don't show 'expected' 3rd Person character movement with strafing? Other than MMO's (I believe), I can't think of a 3rd Person game in this day and age that has A and D 'turn' the character?! Is it safe to assume added proper strafing animations to MC should be rather trivial?

    Good stuff Tryz and thank you!

    -Steven
     
  34. Tryz

    Tryz

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

    Thanks for the kind words.

    As far as the strafing movement, the answer is... it depends. For my game, I've modeled a lot of the camera work and motion off of Tomb Raider and Assassin's Creed Black Flag. In both of these games, pressing A and D turns the character vs. having them strafe. I'm a big fan of adventure games, so that tends to be where my brain goes. :)

    That said, there is strafing in the sneak and adding it should be pretty easy.

    If you go that route and get stuck, feel free to email me at tim@ootii.com.

    For anyone interested in seeing what we're up to, you can check out our new website: Hallow's Deep. Let me know what you think. :)
     
    Last edited: Aug 18, 2014
  35. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    I added strafing in my bow ranged system I made for Motion Controller(it wasn't all that hard.). Another thing I would strongly recommend is that you guys check out Motion Controller using Tim's Adventure Camera asset also, they go hand in hand and you won't be disappointed.

    https://www.assetstore.unity3d.com/en/#!/content/13768

    I'll be posting a video of my game Voidkeeper's progress(featuring: Motion Controller, Adventure Camera, G.A.C., and Advanced AI), once I get my Inventory system finished, and rebuild one of the levels with the new features.
     
  36. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    You're welcome Tim and thank you for the offer!

    I did actually forget to ask one thing:

    In your attached video above, the Goblins know to jump and mantle the ledge to get to their next waypoint, and subsequently come to the edge and jump off rather nicely. My initial guess is NavMesh and Off-Mesh Links...

    ...otherwise, is there an example of how this was done? Is this scene available to DL and take a look at?

    Thank you again! :D

    -Steven
     
  37. Tryz

    Tryz

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

    The best demo is one I put together with Opsive and Behavior Designer. You can download the sample here:
    http://www.opsive.com/assets/BehaviorDesigner/samples.php

    Note that you'll need both Behavior Designer and Motion Controller for it to run. It shows you pretty much the same scene with some extra stuff (sleeping and eating).

    I do use NavMesh and sometimes the off-Mesh links. Basically, the custom actions I put together have the goblins use the motion controller to run to a spot. If they are blocked, they automatically jump. When they jump, they look to see if they can latch on to something and climb. This actually works well without off-Mesh link or with them.

    At the root of this is the MotionController.ActivateMotion() function that I pass the jump motion to (when it's time).

    Unfortunately I can't give out this exact scene because it uses the Behavior Designer and I've monkey-ed it up. :(

    I hope that helps. If you need more info, let me know. I'm not trying to be vague. :)
     
  38. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    No no that's great! Actually I dug deeper into your asset (well as deep as the Inspector, hehe) and noticed the Ledge parameters, so yea it appeared to me to be a custom action.

    Last thing on the climbing; is this action for NPC's as granular as it is for the PC controller, to recognize when the ledge is merely waist high, versus being a full mantle over a taller surface (that yes, requires jumping), or do they always jump and then test for a ledge? Ideally they'd know to just step up if the surface is shorter than they are tall.

    Again thank you Tim and just fyi I'm very happy with your asset (I'll toss up a review as soon as I've gone through the rest of it). :D

    -Steven
     
  39. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    hi she exist any YouTube video for tutorial for see how add animation workflow i need add kick and punch for exemple thank's
    ps :i t's possible to use 2 jump animation
    any change log today
     
  40. Tryz

    Tryz

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

    Interesting point. With the player-controller, the jump button distinguishes automatically. Since the AI behavior tree actions call MotionController.ActivateMotion(...) explicitly, it wouldn't know to jump or 'step up'. I have to think about that more.

    My goal with the NPC side is to make it work just like a player was controlling it... in this case, I'm realizing it wouldn't. hmmm.... need to change that.


    Hi Kilik128,
    Here's a 'How to create your own motion' video. I think it does a good job of showing you what's involved. That should lead you to the other tutorials.



    I'm actually putting claw swipes in for my goblin now and it's taking about 15 minutes each (of course I realize I built the system) :) That said, it should be pretty easy.

    2 jump animations should be fine, but you're probably going to want to create your own jump motions and that can be pretty tricky. The reason the built in motion is so complicated is so it can handle jumping on-top of things. For example, what happens if you have a single jump animation (from launch to land) and something comes underneath you before you finish the animation? You still want to land on the platform gracefully... lots of tricky things like that to think about.


    Side note, check out my latest blog for a video on the progress of combat! I give you some pointers on the systems needed. :)
    Hallow's Deep Blog
     
  41. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Wonderful! Of course this should add another layer of authenticity to the AI's presentation.

    Now I've tried digging around before asking this, but I'm not entirely sure I found exactly what I needed...

    ...being an animator, I plan to use only my own custom motions, and at that I'll want to create climbing sequences. I did notice the ClimbCrouch Properties such as HandGrabOffset and BodyTargetOffset, and am assuming that I'll be adjusting these to fine tune the syncing of the characters mantling pose to a ledge. Is this entirely the case, or is there more to setting up a climbing motion in my application prior to export so that it aligns nicely to edges?

    A guide to creating custom animations that explain elements such as this, use of root motion and whatnot, that might go a long way to helping people new to your asset. If there is one and I missed it, my apologies!! :D

    Cheers Tim
     
  42. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey Steve. Those are all the settings you need. They worked for both the Unity default character as well as our goblin.

    When building the animation, I put a box inside MotionBuilder and used that to help me position the hands evenly. Short of that, it was just those settings.

    Good point about a guide to integrating custom animations. Time is my worst enemy right now, but I'll see what I can do.
     
  43. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Awesome thank you yet again Tim!

    Yea, I'd say spend said time wisely, but I'll argue (for you in fact) in favor of a Custom Animation Integration Guide simply because you know not everyone is going to want to use the same Unity motions, and are eventually going to need/want to put their own in. This way you won't be answering questions like my last one, over and over again ad nauseum. :D

    Cheers man

    -Steven
     
  44. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I want to ask when the solution for movement style change is comming and if there will be one or more demos in your asset to learn how to use this. This is something great i think and also can be used on mobile to made better looking ui´s on them by not place so many buttons on the screen but just change the buttons that are there to the mode the character is now in.
     
  45. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi RandAIThor,

    If you're talking about what I think you're talking about, the code actually supports "styles" now (I call them "stances"). In fact, I use it in the sneak motion.

    It's actually just a flag and it's up to your custom motions to respect the flag during TestActivate() and TestUpdate().

    For example...

    In the ControllerState object there's a property called "Stance".

    It's an int, but is enumerated by EnumControllerStance. Right now it has the following values:
    TRAVERSAL
    COMBAT_MELEE
    COMBAT_RANGED
    SNEAK

    I set the stance value in the sneak motion when the "ChangeStance" input action is detected.

    You could then query the MotionController.State.Stance value to determine if you're in the "SNEAK stance" and change buttons in the UI.​

    The Walk360 motion uses a similar approach by setting the stance to COMBAT_RANGED. It keeps the character always facing forward.

    In this way, you can add any number of stances you wanted... "WOUNDED" for example.

    You could hijack the Stance property and actually set its value inside of the InputManager itself. Then, your motions would actually look at the value to determine if they should activate. This is similar to what I do in the Adventure Controller, but that's would be unique to your implementation.

    So, all the pieces are there. There isn't really anything else for me to add.

    Hope that helps,
    Tim


    Sorry, last thing. If you check out my YouTube channel, I have a couple of tutorials up there. If you have a specific request, let me know what it is and I'll see about doing it.

    https://www.youtube.com/channel/UCTT6UXR55Q6X472rjCsF9jQ/videos

    In this case, I think the steps I defined above (if I'm understanding correctly) should cover it.
     
    Last edited: Sep 13, 2014
  46. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Any thoughts on the swimming(maybe just treading water even, with directional movement of course.) and ladder climb implementation we discussed a while back?
     
  47. Tryz

    Tryz

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

    I'm not sure I'll ever get to swimming. That's one that I'm just not sure where to even start.

    As for the ladder climb, that will be a good test case for something I'm working on now. I've been coding an IK solution for procedural animations and this would be a good test for that. It will be a couple of weeks, but I'll keep you posted.

    How is Voidkeeper coming? Any new videos?
     
  48. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Voidkeeper's coming along beautifully. I'm still working on the home dojo, but am almost finished with the InControl friendly item box inventory asset for it and the store, then I'll write the level select InControl compatibility, and I'll be turning back to level design(been dying to get back to this point for months.).

    I also can't remember if I asked you before, but:

    Is there any chance to rename the namespace InputManager to something like InputManagerMC, or even InputManagerMotionController, in future releases, as InputManager is fairly common, and causes conflicts with other scripts that use the same naming convention.(I've spoke with a couple other developers regarding this, so I thought I'd hit you up too.)

    Thanks for your time, I should have an Update video once I get the dojo fully functional, I want to show off my inventory.
     
  49. UnleadedGames

    UnleadedGames

    Joined:
    Feb 17, 2008
    Posts:
    242
    Would like to chime in with my two cents and also say this would be MUCH appreciated! :)
     
    kurotatsu likes this.
  50. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Very cool! I find myself jumping back and forth between code, character creation, level creation, etc. too. While I love doing it, it makes for slow progress. :)

    Hey UnleadedGames!

    Unfortunately, the root problem is that some developers aren't using namespaces in their code. If they were, you'd be able to choose between "com.ootii.Input.InputManager" or "com.SomeCompany.InputManager". For all devs out there... namespaces are good! :)

    That said, I'll change the name to MCInputManager in the next release. It may throw off some current users, but should help everyone. I've also been wanting to change the file structure a bit. So, I'll do that all at once.
     
    IFL and UnleadedGames like this.