Search Unity

Motion Controller

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

  1. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Yeah, I just mean making sure everything is compatible. With the new changes on the Asset Store, developers can keep both the 4.x and 5.x versions available.
     
    BackwoodsGaming likes this.
  2. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    What a crazy week. But, I do have some great news...

    I loaded up the latest Unity 5 release candidate and the Motion Controller loaded and ran with no errors! Whoo hoo!

    (You have to celebrate the small wins ;))

    There were lots of "obsolete" messages. So, I need to work on those. But, it was a nice first step.
     
    FargleBargle and hopeful like this.
  3. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'm getting some errors coming in that seem to have to do with Unity's Asset Store servers not being in sync.

    If you get an error message that includes “Assets/ootiiMotionController/Scripts/…”, Unity has delivered the wrong package to you.

    The correct folder structure is "Assets/ootii/MotionController/Code/...".

    So far, this seems to have happened to a couple of people in France and Canada.

    If this is happening to you, please email me a copy of your MotionController.cs file and invoice number. I'll send you a link to the correct package. Please email support@ootii.com.

    I have emailed Unity about it and hopefully it will be resolved soon. I apologize for the inconvenience.
     
  4. Olander

    Olander

    Joined:
    Sep 13, 2014
    Posts:
    405
    Just purchased (Motion Controller and Adventure Rig) and implemented in Unity 5 RC1 and is working. I had some issues with a few things from scratch in my own project but the AdvDemo scene does work. The PDFs are a little vague when combining Motion and Adventure together but taking a few screen shots of the AdvDemo solve my issues.

    There are a few features that really should not have been missed...
    - Mouse Wheel Zooming
    - Keyboard Toggle Modes for Sneaking, Walking, Jogging, Running
    - Auto Climb Ups on shorter edges....not intuitive on whether Jump will Jump or Climb Up

    All in All a very solid design and does function very nicely in Unity 5

    I will be very eagerly looking for the Bone Controller

    Thanks Tim for all of your great products!
    Cheers
     
    Tryz likes this.
  5. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Thanks Olander, I appreciate the feedback.

    It's always tough with these kinds of projects to make them suitable for everyone's game play styles, but you've got some good ideas.

    Thanks again!
     
  6. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
  7. WizardGameDev

    WizardGameDev

    Joined:
    Jul 25, 2012
    Posts:
    62
    Greetings,

    I'm trying to get the Goblin Life sample to work with Behavior Designer and running into a few problems. I naturally imported BD with the movement pack as well as MC... then pulled in Goblin Life assets. After baking the mesh I could run around but the other Goblins just stand there. I checked the behavior trees and it seems they are losing the connections to their motions. Many tasks in the behavior tree just say... "Unknown Transverse Towards" or "Unknown Activate Motion" and have a red x. The character you control works ok.

    I don't get any compile errors. When opening goblin life as a project and then import the behavior is a little different. My guy can move around but he is all crumpled up. So I think that is worse off whereas the one way I think it is the behavior tree AI's that are not connected and the other the AI is not connected and it's having other trouble getting any of the animations to preform.
     
  8. Tryz

    Tryz

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

    Sorry that the Goblin Life samples aren't working. I'm not sure why the AI isn't running. The way you did it the first time was correct.

    When I get a chance, I'll see if there's something on my end that I can do. It was a joint project between me and Opsive. So, I may need to reach out to him too. However, it may take me a little while to figure out what's up. I know that's a sucky answer, but it's best that I be honest.

    As I do know more, I'll post here and let everyone know.
     
  9. fredmonroe

    fredmonroe

    Joined:
    Feb 10, 2015
    Posts:
    2
    Hi Wizard,

    I was playing with this sample as well this morning and had similar issues to you. (My player was crumpled and when he moved, the animations didn't fire.)

    What seemed to help for me was this:
    1) open the Goblin2 animation controller (you can find it on Goblin Player)
    2) Double click the Idle-SM subtree to open it
    3) Click on "Idle_Casual"
    4) Notice how several of the transitions are muted. I don't know if this is intentional, however, when i unmute them things seem to work slightly better.

    I don't claim to fully understand what i'm doing in the above recipe, or that its a correct fix - but it worked for me so I felt i should share it.
     
  10. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    @fredmonroe Thanks for jumping in. This will give me a place to start looking too.

    3 points for you!
     
  11. fredmonroe

    fredmonroe

    Joined:
    Feb 10, 2015
    Posts:
    2
    you're welcome, love your products - your pride in craftmanship and documentation shows. Looking forward to bone controller.
     
    Tryz likes this.
  12. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    It sounds like the Motion Controller integration tasks are missing. Did you first import those from the integrations page? So your steps should be:

    1. Download the Goblin Life sample project and open the project
    2. Import Motion Controller
    3. Import Behavior Designer
    4. Download the Motion Controller integration files and import them into the project
    5. Open the Goblin Life scene.

    I just tried these steps and it worked (the goblin wasn't crumpled either)
     
  13. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    1) is covered (heh)
    2) I have provisioned a community swimming motion to Tim, he will be providing it. There is no dive but there is plenty of scope to add a few.
    2.5) can't speak on this I use finalIK, unity provides a few "script-side" solution for pro-users that may be adapted. The "climbing" up the side of parkour grabbed blocks is done.
    3) blurb this is pretty much done
    4) I have 2500+ mo-cap muscle clips in 3 tomes that I unpacked locally to a single, vast, project; sprinting is among the animations. You could check the licensing suits your needs.
    5) is really linked to having a "mount point", possibly offset LOS and utterly doable
    6) 7) 8) blah) I would point to the answer for 4) again

    Hope it helps.


    The license for the animations:
    [The original library was free for all uses and since Bruce Hahn puts no extra restrictions on the BVH version I won't put any restrictions on this FBX version either. This means that every animation of this library can be used for any purpose, including commercial games and adding the animations to other assets.]
     
    Last edited: Feb 17, 2015
  14. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Have this. Is super bomb awesome. Just saying. And Bitmap2Material and SubstancePlayer and the incredible database and... just awesome...
     
  15. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    @opsive: Thank you for jumping in and helping.
     
  16. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    @twobob:

    Great stuff. I didn't know about that animation library. That's awesome.

    I'm also looking to dig into the swim and get that out for everyone. Just not enough hours in the day. :)
     
  17. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I thought more about this.

    One of the main failings of most controllers is - quite frankly - you don't know the moves are there.

    what about really thinking outside the box, use a transparent shader - or projector - and project a copy of the hands (legs, feet, arms?) lerped toward the available motion in a ping pong cycle. Or on the object. Spiderman kind of did it on the Xbox but with full Body IK projections.

    projections.JPG


    It would probably take half a day to knock up a demo (possibly less) and would certainly be incredibly value-adding.

    Those are my thoughts. Would be awesome
     
  18. WizardGameDev

    WizardGameDev

    Joined:
    Jul 25, 2012
    Posts:
    62
    I'm having trouble getting the motion controller to respond to motion or speed on the object.

    I'm using behavior designer with a very simple tree. I just want to say use the standard 'forward' motion by calling 'Activate Motion' and then using a search task to perform the AI actions.

    The search works exactly as it should and will send my avatar all around looking for the enemy... the problem is the motion controller seems to ignore everything that is going on and not picking up on any of the transforms that are happening to the agent.

    Worse, sometimes the motion controller seems to just get in the way of the AI making it hard to debug if the searching, patrolling and converging on the enemy is working... so I end up turning off the motion controller entirely and the guy just goes around in idle everywhere. Ironically I can get that going very smooth and all the actions I want... but as soon as I try to use the activate motions it all trips up. I'm just not sure how to get it all synced together and what I thought would be a few hours has become very tedious to figure out the best solution. There has to be a cleaner and easier way to have the AI work with the motion controller that I'm missing.
     
  19. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    There is an AI example NPC in the demo, it pretty much just takes scrapes positions IIRC.

    There is a concept of a shared transform in behaviour designer... perhaps that is the issue?

    I have both projects. Behaviour designer and Motion controller. Throw me a link and I will have a look? Caveat, I don't know much about /using/ either system, but I do know what I am looking for and I have a J I T step-through via VS.
    Happy to look
     
  20. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey @WizardGameDev, I think you're trying to "activate" the forward motions and you shouldn't.

    Instead, use the Motion Controller's functions:
    MotionController.SetTargetPosition()
    MotionController.SetTargetVelocity()
    MotionController.SetTargetRotation()

    Then, I'd use MotionController.ActivateMotion() when I wanted to force a specific action to take place (ie a jump or swing).

    That's what I did in the goblin demos and scenes.

    All of these were wrapped in AI nodes and were distributed as works-in-progress.

    You can see all that in action here:




    Please remember that plug-n-play integration with Behavior Designer, Node Canvas, RAIN, or other AI solutions isn't a native feature of the Motion Controller. I think it could be and that's why you've seen me do some work in that area. However, that means there's more work to be done and what I do have probably needs improvement.

    I'm happy to work with you on better integration. I think it could be cool for everyone. I've also got some sample code I can send that may help.

    I'm not exactly sure what you mean by "not picking up on any of the transforms that are happening".


    Feel free to email tim@ootii.com and I'll send what I have over.
     
    Last edited: Feb 18, 2015
  21. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Unfortunately, you can't real share a transform the way I think you're meaning. If you do, things like collisions detection, gravity, and root-motion all go out the window. The standard Unity Character Controller (which is at the base of the Motion Controller) relies on functions like Move() to change the transform... after collisions, gravity, and other forces are taken into account.
     
  22. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Err.

    I mean like the Class SharedTransform in the Behavior Designer project which can compensate for such things if leveraged correctly and allows a shared transform to be meaningfully updated in a MVVM type way, IIRC. However it was a bit of a brain bender to reference them in code I seem to recall so I was pointing the finger at them is all :)
     
  23. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    MVVM is a way of saying "The interface doesn't care (or even know) about the business logic". I've always agreed with that and since the transform (as a reference) IS the business logic of the character controller, exposing it in the UI (as a shared component) is dangerous. Like I mentioned, it means we can't pre-process it for collisions, validity, or correction. It will totally bypass all those business rules.

    Now, it's possible we could read and overwrite the value, but that's only if we're positive of the order of the updates we'll run. Typically, with Unity, we're not.
     
  24. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I take it back. after digging through the implementation it is just a specialised overload of transform (okay it actually inherits from SharedVariable and has a public static implicit operator expecting a transform, to be specific)

    The actual "Setting" and other operational methods return success codes.
    It's probably not that. My bad.
     
    Last edited: Feb 18, 2015
  25. Grave174

    Grave174

    Joined:
    Jun 20, 2014
    Posts:
    15
    Great asset its working well with the UMA models I have. wondering if anyone has tried using UMAzing with the motion controller?
     
  26. ValrikRobot

    ValrikRobot

    Joined:
    Jun 26, 2013
    Posts:
    206
    This seems the perfect package for me, shame funds dont make it easy for me. I would love to be making more and more motion add ons for this.
     
  27. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I was going to, but gave up on UMA when I realized I had to create the meshes on-the-fly everytime. Inherent persian flaw. So I didn't, sorry.
     
  28. Grave174

    Grave174

    Joined:
    Jun 20, 2014
    Posts:
    15
    Im trying to add a create a character mode for the players so i am adding motion controller to UMAzing. But I have a problem when I use UMAzing to create a character, it builds a extra controller on the model at runtime which I have to delete. I also have to set up the camera rig again and for some reason the character movements are inverse so he starts running backwards. if anyone has run into the same problem I would appreciate the help.
     
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    I don't know if you can do this, but maybe have a UMA character that is pre-made and simply change it during "creation" ...?
     
  30. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I kind of recall UMA being completely open source. Not sure about the Zing implementation. In either case, aim to disable the controller creation/addition section (gotta be one "add commented" somewhere) and dig around for where the value are inverted.

    Example: get text GUI. in Update() splatter the current Input.InputManager.controller.y (I made that up from memory go check what it should be) into the Text box. post your results here. Then we would know if that actual controller value was inverted. or what.
    (Like I pressed up, it was 1, or something)
    Hope it helps
     
    Last edited: Feb 18, 2015
  31. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    @Grave174: UMA uses base character prefabs, found in the UMA Assets\Races folder, which can be modified before using them in UMAzing. Just drop these prefabs into your scene, change the character controller, and re-save them, and I believe any new UMA characters you create should have the new controller.

    You should be able to set your camera up in a similar way. Configure it to work properly with the UMA base prefab. Then, just make sure the prefab has a "Player" tag when you save it, and run a script that binds the camera to the object tagged "Player" once it gets instantiated by UMAzing.
     
    Last edited: Feb 19, 2015
    twobob and hopeful like this.
  32. WizardGameDev

    WizardGameDev

    Joined:
    Jul 25, 2012
    Posts:
    62
    Many thanks for the assistance. This was a lot of help. It appears I likely just need to create some more custom actions to work with the movement package in Behavior Designer if I'm going to go that route.

    So here is what I get. The motion controller isn't really driven of any physics acceleration from movement or other changes in transform. Then we have a situation where the motion controller has basically the setposition type functions that you could feed a coordinate from another AI system... like from Behavior Designer. But if you just set the transform you don't get there. That makes sense I wouldn't really expect otherwise.

    So one consideration I'm thinking is just perhaps using two completely separate objects. One is an object that is driven by the movement AI (search, wander, follow, leader, waypoint, etc.) and then setup tell the motion controller to use the transform of that object as it's SetTargetPosition. Or perhaps I could just self reference and another object is not even necessary.

    One thing I do fine a bit tricky is as I approach a destination the character animation can get weird. Playing with the destination distance seems to have major impact on that entire process by feel like I lack control.

    Another thing that seems to be just happening unrelated to anything I can put a finger on is the animation seems to skip a bit when everything first starts out moving... then everything levels off and the character seems to animate fine from there on out. I'm not sure if anyone else has seen an instance where it just seems to have odd behavior in spots.

    Many thanks again for all the help. This is a great asset.




     
  33. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Thanks everyone for helping out with the UMA stuff. Unfortunately, it's just not something I spent a lot of time with. You guys rock!

    @WizardGameDev , What you said about creating custom actions is exactly right (for any AI system). In the goblin demo that Opsive and I created I actually have created some actions and conditions for you. They aren't documented, but they should be pretty easy to follow. If you can't find them, shoot me an email (tim@ootii.com) and I'll get them for you.

    I also have some for Node Canvas if anyone needs them. Again, they are works-in-progress. Once things calm down for me, I'll try to make them part of the Motion Controller package itself.

    I found that I didn't need to have a separate "leader" object for the movement. I was able to accomplish the wander and direct movement using those functions I mentioned and the new actions. You should see that in the goblin demo. If that doesn't help, I'll try and whip up a simpler demo. It just may take me a week or two.

    I think the weird slowing down as it gets close to the destination is me. I have some logic that slows the character so that he doesn't overshoot the destination, but it looks like a change I made took it to an extreme. I'd call this a bug and will jump on it this weekend.

    Any chance you can get a video of that animation skipping? That I'm not sure about.
     
  34. UnleadedGames

    UnleadedGames

    Joined:
    Feb 17, 2008
    Posts:
    242
    Tim what's your stance on sharing modifications and new motions? I recently acquired a motion capture suit (project neuron from kickstarter) and I have pretty much turned your system into a Batman Arkham style combat system, I'm getting ready to work on props after you release the new IK Bone plug in. I notice you said you were a little disappointed that no one has shared any new motions or add ons perhaps I can help with that issue and get the ball rolling.
     
    Last edited: Feb 19, 2015
    hopeful and FargleBargle like this.
  35. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Sharing motions... I love the idea!

    A while back, I created this simple page. I figured if people did create and want to share, I would enhance it and create a bit of a centralized hub. Or, people could give/sell their own packages on the asset store.

    Obviously I would just ask everyone to be careful and not give away the Motion Controller code itself. That's my bread and butter. ;)

    If you're willing to do that, I'm happy to help in any way I can. Even if it means we need code changes to the base Motion Controller itself.

    Between client work and getting the Bone Controller out, I'm buried for the next couple of days, but I'll help any way I can. Feel free to email tim@ootii.com.


    Batman Arkham combat!! Exactly what I'm going for... :eek:
     
    BackwoodsGaming likes this.
  36. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    A centralized repository of shared motions would be ideal, imo. Maybe a page of commercial motions (or section on the same page depending on how it is setup) with asset store links would be a nice addition as well since sometimes finding something on the asset store can be a chore. lol
     
    Tryz likes this.
  37. Grave174

    Grave174

    Joined:
    Jun 20, 2014
    Posts:
    15
    @FargleBargle I was checking the UMA thread and I saw you have asked about everything that I have been wondering myself. About adding the camera, controller and a couple other things and you made some great points. Thanks for the help I appreciate it
     
    FargleBargle and Tryz like this.
  38. ValrikRobot

    ValrikRobot

    Joined:
    Jun 26, 2013
    Posts:
    206
    i guys. real proud to be a part of this group now. anyway, after loading the demo scene i tried to change the simpleforward motion layer to walk360 bt when i run the character doesn't move. any advise
     
  39. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi Valrik. Welcome!

    The Walk360 motion was built specifically for the Adventure Camera for use when the character is aiming (zoomed in). It's what allows the character to always face forward while aiming.

    As I re-read the description, I see I don't explain this anywhere...go me! (Amazing what you find when you go back 6 months later). I've updated it for the next release.

    What you probably want is "SimpleForwardActivated". Here the avatar walks until you press "left shift". At that point, he runs.

    I hope that helps,
    Tim
     
  40. ValrikRobot

    ValrikRobot

    Joined:
    Jun 26, 2013
    Posts:
    206
    that's great thanks. is there away to strafe when pressing left and right instead of walking the way it does?
     
  41. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    If you look into the Walk360 motion, that's what it does. Most of what's stopping that motion from working with the Follow Camera is just the test for "Aiming" that is inside the TestActivate() function.

    I'll bet that if you were to look at it, you could get it to work. It would be a good first step towards building custom motions as you mentioned.

    If you want to take a stab at it, I'll help through email (tim@ootii.com) and then we could publish it for everyone... your call. :)
     
  42. ValrikRobot

    ValrikRobot

    Joined:
    Jun 26, 2013
    Posts:
    206
    sounds good. ill email you now
     
  43. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Question for you...

    As I finished up the Bone Controller, I realized that I really want to change out the Unity Character Controller that the Motion Controller relies on. My initial tests leave me pretty confident that I could replace it with something that gives the ability to walk on walls/ceilings, works better with AI, tosses out the capsule collider, and has slightly better performance.

    So, I need your help... Which do you prefer I do next:

    1. Create an official Unity 5.0 Motion Controller

    2. Replace the Unity Character Controller

    3. Create some new motions (list a couple you'd like to see)
     
    Last edited: Mar 4, 2015
    FargleBargle likes this.
  44. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    I'd say keep going with what you're working on, so #2.

    Then in a bit it will be time for probably #1 and #3 in an update together.

    (Probably the new motions would either be related to the new character controller and/or some stuff from the free mocap library.)
     
    ValrikRobot and Tryz like this.
  45. ValrikRobot

    ValrikRobot

    Joined:
    Jun 26, 2013
    Posts:
    206
    agreed
     
    Tryz likes this.
  46. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    agreed : #2 , #3 then #1 .
     
    Tryz likes this.
  47. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Would the Unity 5 Motion Controller be substantially different than the existing one, or are you just talking about ironing out any bugs that might occur when upgrading to U5? If you mean to leverage some of the new standard assets, and other features, great. Otherwise, by all means continue on with #2. I imagine this would make designing motions for crawling, swimming, climbing and flying, among other things, a bit easier, since the standard Character Controller isn't very good at these things. I'm thinking there might be a bit of synergy between the items on your list though, as you may want to incorporate Unity 5 features into your new controller, and creating a few new motions to test its capabilities might also make sense. :p

    If you think there's a better solution than the standard CC, I look forward to seeing what you come up with.
     
  48. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    No major difference for U5... yet. I would like to take advantage of some new features, but I also don't want to abandon U4 users. Although with the pricing announcement, we may not have many U4 users left. :)

    I totally agree with the synergy of them all and I think the core CC is the...core of it.
     
    FargleBargle likes this.
  49. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    This is pretty cool...

    With U5, sub-state machines now have an "Entry" and "End" node. This allows the sub-state machines to be independent from the Animator itself. This is perfect as it's exactly how the Motion Controller uses sub-state machines.

    So, copying a sub-state machine from a "motion package" someone else creates will be a breeze. We shouldn't have any broken links. Whoo hoo.



    Edit...
    In fact it looks like they are exposing the API that would allow us to create sub-state machines from code. That's event better!
     
    Last edited: Mar 5, 2015
    BackwoodsGaming likes this.
  50. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    All products (including the Motion Controller) now officially support Unity 5! :D

    Once I got on a roll, I figured it was best to get through them all.

    The Motion Controller had the biggest changes due to some changes in the Unity 5 Animator API. However, it was more a matter of some fancy compiler directives.

    That said, Unity 5 has some awesome Animator features we'll be taking advantage of...
     
    FargleBargle and hopeful like this.