Search Unity

Motion Controller

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

  1. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Alpha Testing for the SoulLink AI system started on Friday. License holders of SoulLink Spawner can join the alpha test right now. Direct message me on Discord with invoice number to get into the testing group. The alpha test will have Ootii Motion Controller added for the next package update.

    https://discord.gg/ncW9UmU
     
  2. dvijay

    dvijay

    Joined:
    Dec 21, 2015
    Posts:
    4
    Lately when I use the Third Person Motion Controller Character Setup Wizard, it seems to be stuck on the progress bar at this step:

    Configuring Input (Step 4 of 6)
    Input Manager settings

    This happens with both Unity 2020 and 2021. The project is using the new Input system. Is there anything I'm missing? It used to work fine before (at least with Unity 2019). There are no errors or warnings in the console. It just hangs there forever. Any help is appreciated.
     
  3. PiterQ70

    PiterQ70

    Joined:
    Mar 3, 2015
    Posts:
    82
    Same problem. But in my case in 2021.1.28 work with UIS normally but in 2022 same problem
     
  4. TungNguyenViet

    TungNguyenViet

    Joined:
    Oct 5, 2016
    Posts:
    10
    Hi @BroVodo ,
    Could you share your backup?
    I asked @Tryz but he lost his backup so now no way to get the old packages in valult.
     
  5. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    I *think* this is the package containing all of my motion packs for Kubold's animations. I don't have Unity installed on my main computer right now to check. I'll try and verify soon if I get the chance.

    Kubold Motion Packs
     
  6. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    The new Input system didn't exist yet when I wrote the Character Wizard. It wouldn't surprise me if it hangs when trying to configure the Input Manager.

    Unfortunately, it may simply be unusable with the new Input system. I haven't done any Unity development for a couple of years now. The Wizard was never a core part of the system, just a convenient add-on that I originally built for my own use, so I don't think that @Tryz intends to update it.
     
  7. TungNguyenViet

    TungNguyenViet

    Joined:
    Oct 5, 2016
    Posts:
    10
  8. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
  9. MaorDany

    MaorDany

    Joined:
    Dec 31, 2017
    Posts:
    105
    Question before buying your packages.

    Third Person Motion Controller
    Swimming Motion Pack
    Shooter Motion Pack
    Archery Motion Pack
    Sword & Shield Motion Pack

    Yesterday I discovered all your packages and it looks amazing.

    1. I wanted to know if it is possible to combine all of them, so that one character does all these animations? (I need it for a survival game)
    2. I saw that there are video tutorials but they are from 5-6 years ago. Do they fit the new packages?
    3. Are the packages suitable for Unity beginners?
    4. Is it possible to add a UI to control the character (joysticks for mobile?)

    Thanks!!!
     
  10. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    1. Yes. My game character currently uses the swimming, shooter, and sword & shield packs, and I've used the archery pack as well in testing, even if not in my actual game.
    2. The videos are old because @Tryz got a real job a few years back, and hasn't had as much time to make new ones. That said, MC still works great in Unity 2021, and I've tested with no obvious problems it in 2022 as well. Most of the information in the videos should still apply to current packages.
    3. It depends what you want to do with it. While it offers great out-of-the-box features, and fairly simple setup, more advanced implementations will still require coding. The documentation is first rate though. I was a beginner when I first started using it, but feel pretty comfortable with it now, to the point of adding several custom motions and behaviours of my own.
    4. Yes. Again though, it will take a bit of coding, or a 3rd party virtual joystick app.
     
    Last edited: Oct 13, 2022
    TeagansDad and schmosef like this.
  11. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
  12. TungNguyenViet

    TungNguyenViet

    Joined:
    Oct 5, 2016
    Posts:
    10
    @BroVodo , Thank you for sharing. It has more than I expected.
     
    BroVodo likes this.
  13. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
    I've noticed that when using Motion Controller and Behavior Designer with the demo_Live scene, using input movement rather than transform movement allows the behavior to repeat as intended.
    Specifically:
    Uncheck Use Transform on the Actor Controller.
    Use a WalkRunStrafe motion and check Rotate With Input on the motion.
    Uncheck Use Nav Mesh Agent Position on each of the Navigate To nodes in the behavior tree.
     
    TungNguyenViet likes this.
  14. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
    I spent a couple of hours trying to work out why the Use Transform movement wasn't working. This failed because it was working correctly, it was the Behavior Tree that was incorrectly structured and getting it to work by changing to the Input movement is just a bizarre coincidence.

    Now to the extra fun part - after fixing the Behavior Tree I tried exporting it as an asset so as to share between projects. I selected a folder outside my Unity project to export to. This not only crashed Unity but totally deleted my project's entire Assets folder, not to the trash but completely gone from my HDD.

    I know that I'm a human edge case but this is just taking the p*ss.
     
  15. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52


    Unity 2020.3.41f1. NavMeshAgent navigation is getting stuck based on what is selected in the Scene Hierarchy and if the Inspector or Navigation Tab is selected. This makes it incredibly difficult to debug and to know what will work in an actual game build. There may also be other things that affect this such as whether the game window is on a second monitor.

    Bizarre.

    Edit:

    I fixed this by setting navmesh agent speed to 10 when moving then 0 when not moving. And in lateupdate set NavMeshAgent.nextPosition = MotionController._Transform.position to prevent the navmesh agent's position from overshooting the motion controller's position.
     
    Last edited: Nov 1, 2022
  16. jeffersonrcgouveia

    jeffersonrcgouveia

    Joined:
    Nov 6, 2019
    Posts:
    3
    When I click on the "Generate Motion Script" button, and replace the generated code in the Climb_0_5m.cs class with the code from the clipboard, the Phase ID field and the animation state fields are gone. I have noticed that the method OnSettingsGUI(), that creates these fields is not being generated. Am I missing something or is it a bug on recent versions? The problem happens with any motion class, not just the Climb_0_5m.cs.

    upload_2022-11-2_19-29-50.png

    upload_2022-11-2_19-29-58.png
     
  17. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
    The Generate Motion Script button is for when you have created a custom motion. It reads the Animator component for the Animator Substate referred to in the SM Name field. This generates code that helps the Motion Controller use your custom motion. It also used to generate code that allowed the Animator Substate to be recreated when clicking the Create Animator State Machine button, but I think this latter function has been moved to the Generate Definition Script button.

    If you are using the built-in Motions (not creating a custom motion) you only need to click the Create Animator State Machine button, and you only need to do this if you aren't using one of the premade Animators from the Motion Controller asset, such as the Humanoid animator in the ootii/Assets/MotionController/Content/Animations/Humanoid folder.

    If you want to use a different set of animations for climbing you might be able to swap the animations in the Climbing Substate machine if the animations are similar enough.

    You should create a copy of the Humanoid Animator or create your own Animator before using the Create Animator State Machine button. You may need to reimport the Humanoid Animator if you used the Create Animator State Machine button on it.
     
    jeffersonrcgouveia likes this.
  18. jeffersonrcgouveia

    jeffersonrcgouveia

    Joined:
    Nov 6, 2019
    Posts:
    3
    Hi @BroVodo, thanks for answering.

    I was trying to use the Generate Motion Script button to be able to recreate the Animator Substate, as you have mentioned. I couldn't see the OnSettingsGUI method generated on the Generate Definition Script button as well.

    I was following the tutorial on the following video, where the generated code has the method (22:34) and the Animation States are showed in the inspector, it seems to be a nice feature.



    I'll do the way you have explained, thanks :)
     
    BroVodo likes this.
  19. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
    It looks like the OnSettingsGUI method is left over from the old version of the Motion Controller Generate Scripts button, or was custom written for each of the built-in motions.
     
    jeffersonrcgouveia likes this.
  20. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
    If using MountPoints with the BasicInventory the CreateAndMountItem function fails to assign the owner gameobject to IItemCore.Owner.
    From line 1163:
    Code (CSharp):
    1.  
    2.                
    3. #if USE_MOUNT_POINTS || OOTII_MP
    4.  
    5. if (mMountPoints != null)
    6. {
    7.    //lItem = mMountPoints.ConnectMountPoints(rParentMountPoint, rResourcePath, rItemMountPoint);
    8.    UnityEngine.Object lResource = Resources.Load(rResourcePath);
    9.    lItem = GameObject.Instantiate(lResource) as GameObject;
    10.    bool lIsConnected = mMountPoints.ConnectMountPoints(rParentMountPoint, lItem, rItemMountPoint);
    11.    if (lIsConnected)
    12.    {
    13.        IItemCore lItemCore = lItem.GetComponent<IItemCore>();
    14.        if (lItemCore != null)
    15.        {
    16.            lItemCore.Owner = gameObject;
    17.        }
    18.    }
    19. }
    20.  
    21. #endif
    22.  
     
    Last edited: Nov 5, 2022
  21. McSwan

    McSwan

    Joined:
    Nov 21, 2013
    Posts:
    129
    upload_2022-11-10_14-35-11.png
    seems to fail in unity 2022


    InvalidOperationException: The operation is not possible when moved past all properties (Next returned false)
    UnityEditor.SerializedProperty.Verify (UnityEditor.SerializedProperty+VerifyFlags verifyFlags) (at <686f40992bed4a6ebc158b4beb1e91db>:0)
    UnityEditor.SerializedProperty.get_stringValue () (at <686f40992bed4a6ebc158b4beb1e91db>:0)
    com.ootii.Helpers.InputManagerHelper.IsDefined (System.String rName) (at Assets/ootii/Assets/Framework_v1/Code/Helpers/InputManagerHelper.cs:100)
    MotionControllerEditor.OnInspectorGUI () (at Assets/ootii/Editor/MotionController/Actors/AnimationControllers/MotionController/MotionControllerEditor.cs:280)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass62_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <60f75551aa5a48198f4e815c69574911>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)


    upload_2022-11-10_14-36-51.png

    Is there a fix ?
     
  22. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
    @McSwan I just tried a fresh install with an empty 2022.2.0.b10 project.

    There was a problem with Ariel.ttf needing to be changed to LegacyRuntime.ttf in the EditorHelper.cs file, but the motion controller component was added successfully to the orange Proto character.

    I found that the motion controller component then disappeared after I made the changes to the EditorHelper.cs file and hung around in the scene causing an error until I created a new scene with a new motion controlled Proto character.

    Have you tried a fresh install in an empty project with the basic Proto character? Are you using the new Input System or old Input Manager? Are you using a different version of Unity 2022?

    Edit:
    I got the same message when using the new Input System, I've followed these instructions to get rid of the errors so far:
    https://ootii.com/knowledge-base/unity-input-system/

    In InputManagerHelper IsDefined() at line 88 add this to the top of the function:
    Code (CSharp):
    1.  
    2. #if ENABLE_INPUT_SYSTEM
    3.            return true;
    4. #endif
    5.  
    Edit 2:
    Unity 2021.3.12 - needed to comment out line 1552 in MotionControllerEditor to get custom editor to display correctly (using both input types)...
    Code (CSharp):
    1.  
    2. if (rMotion.ActionAlias.Length > 0 && !InputManagerHelper.IsDefined(rMotion.ActionAlias))
    3.  
     
    Last edited: Dec 16, 2022
    McSwan likes this.
  23. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    Hello,

    I have an issue with ootii 3rd person motion controller. When I import the package it throws the following errors, all related to UnityEngine.InputSystem which does not seems to be available on project. Using unity 2021.3.4f1.
    I did imported InputSystem and switced to it.

     
  24. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
    You need to add unity input system references to the ootii asmdef files, more info here:
    https://ootii.com/knowledge-base/unity-input-system/
     
  25. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    BroVodo likes this.
  26. rayman600

    rayman600

    Joined:
    Nov 12, 2017
    Posts:
    12
    Does anyone have a copy of the Inventory Pro integration files that were in the vault?
     
  27. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi @rayman600 , Unfortunately I lost all the files when I migrated. I've looked on some old drives, but no luck.

    If I can find them, I'm happy to post them. I just haven't yet. :(
     
  28. Rusted_Games

    Rusted_Games

    Joined:
    Aug 29, 2010
    Posts:
    135
    Last edited: Jan 23, 2023
  29. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Rusted_Games likes this.
  30. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    I just ran into this too in a test project. It only seems to cause errors if my MC character is selected in the hierarchy. It doesn't seem to cause other problems, other than spamming the console with errors, and can be avoided by selecting something else in the hierarchy, but it's still annoying. Looks like the EditorHelper.cs script needs to be changed to remove references to the Arial font. Will we get an update that fixes this, or should we just do it ourselves?
     
  31. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey @FargleBargle I thought I already fixed that. It's possible I didn't get it in all the assets and one overwrote the other.

    Give me a couple of days and I'll update them all.
     
    FargleBargle likes this.
  32. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    Why if I change PickUp animation in Basic Interaction SM, I'm no longer able to destroy pickable object?
     
  33. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    I added in MotionController.cs script this code:

    Code (CSharp):
    1. public void OnAnimationEvent(AnimationEvent rEvent)
    2. {
    3.   Debug.Log("Take it!");
    4. }
    I need to trigger event at specific time when animation PickUp run. How to send a message to pickable object and continue with the pickup code? Action Triggered Event in Motion Controller don't fire any method in pickup object...
     
    Last edited: Feb 25, 2023
  34. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    Action Event Trigger in Unity Motion Controller actually works on animation Idle_PickUp by default. As soon as I change the animation (from Mixamo or Kubold) the Trigger no longer works and there is no communication between the Motion Controller and some external script.. What could I do to make it work?
     
  35. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    This code also exists in the script BasicInteraction.cs

    Code (CSharp):
    1. public override void OnAnimationEvent(AnimationEvent rEvent)
    2.         {
    3.             if (rEvent == null) { return; }
    4.             if (!mIsActive) { return; }
    5.  
    6.             // Report the interaction with the core
    7.             if (mInteractableCore != null)
    8.             {
    9.                 mInteractableCore.OnActivated(this);
    10.             }
    11.  
    12.             // Call the callback
    13.             if (OnTriggeredEvent != null)
    14.             {
    15.                 OnTriggeredEvent(mMotionLayer._AnimatorLayerIndex, this);
    16.             }
    17.  
    18.             // Trigger any desired event
    19.             if (mMotionController.ActionTriggeredEvent != null)
    20.             {
    21.                 Message lMessage = Message.Allocate();
    22.                 lMessage.ID = EnumMessageID.MSG_INTERACTION_ACTIVATE;
    23.                 lMessage.Data = mInteractable;
    24.  
    25.                 mMotionController.ActionTriggeredEvent.Invoke(lMessage);
    26.  
    27.                 Message.Release(lMessage);
    28.             }
    29.         }
    I'm still confused and can't figure out how to solve it.
     
  36. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    Do I need an Event System - Dispatcher for my needs?
     
  37. Gervais60

    Gervais60

    Joined:
    Apr 7, 2016
    Posts:
    37
    Hi

    I would like to know if there is a way i could found out how long the player is running from the controller so that i could start to make the player display sign of fatigue

    Thanks
     
    Last edited: Mar 26, 2023
  38. westergard

    westergard

    Joined:
    May 4, 2015
    Posts:
    91
    HI Tim,

    i imported your motion controller pack, then the Sword & Shield / archery / swimming / spellcasting packs. Then i shut down unity, then i import all the animation from Mixamo like said in the guides, then i extracted all the .meta files from the EXTRAS folders. In the past, this was working great. Now, motion controller works, but the packs are not working, even in your demos.

    When i press 1-2-3 to enter combat/archer/casting stance, the player goes into a mode where i bends in 2, and his feets are over his head. See picture. Even the NPC goes into this stance. I have used and imported the animations exactly as stated in the user guides.

    I have any idea how to solve this? Anyone?

    Thanks a lot for your help
     

    Attached Files:

  39. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Turns out there was a problem with @westergard's animations / meta files. The instructions say to download them from Mixamo, but their packs may not exactly match the included meta files, or what MC and its motion packs expect to see anymore. We've sorted it out in his case, but if anyone else runs into this issue, here's a link to tested and working animation packs, with matching meta files. :cool:

    https://www.dropbox.com/sh/ub7yqtno0tpywpe/AAAPXAkYDftMdisYaVr4pJOEa?dl=0
     
    Last edited: Sep 12, 2023
    BroVodo likes this.
  40. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    Which parameters in the Actor Controller can help me to stick character to the ground?

    foot.jpg
     
  41. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    I need to change Anchor Transform from Camera Rig at runtime. Do you have any suggestion?

    Code (CSharp):
    1. using UnityEngine;
    2. using com.ootii.Actors;
    3. using com.ootii.Geometry;
    4. using com.ootii.Helpers;
    5. using com.ootii.Input;
    6.  
    7. namespace com.ootii.Cameras
    8. {
    9.     [AddComponentMenu("ootii/Camera Rigs/Orbit Rig")]
    10.     public class OrbitRig : BaseCameraRig
    11.     {
    12.         public override Transform Anchor
    13.         {
    14.             get { return _Anchor; }
    15.  
    16.             set
    17.             {
    18.                 _Anchor = value;
    19.             }
    20.         }
    21.     }
    22.  
    23. }
     
    Last edited: Mar 25, 2023
  42. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    This is controlled by Actor Controller's Body Shapes module.

    Screenshot 2023-03-25 120922_1.png

    Just hit the Auto Create button, replacing your current body colliders. You can tweak the Foot Sphere's radius and offset afterwards if needed, but the auto generated settings are usually fine.

    To change what the camera looks at, I usually create a camera anchor game object, and attach it to my player. If I need to anchor to something else, I can just re-parent the anchor object to it, without needing to dive into the Ootii camera rig script. My player carries around a few extra "skins" that can be activated when needed - so he can change into a space suit or scuba gear for instance. When that happens, my original player gets deactivated, and one of the alternate players gets activated instead. Rather than anchoring the camera to any of the players, I anchor it to a separate anchor object, and anchor that to the currently active player. As far as the Camera Controller script can see, the anchor never changes.
     
  43. ciathyza

    ciathyza

    Joined:
    Aug 16, 2015
    Posts:
    112
    Hi, quick question since I'm pondering about buying Third Person Motion Controller ...

    Does it support a first-person mode or can a first-person camera mode easily be added? Or is the motion controller designed to be absolutely Third Person-only?
     
    Last edited: Apr 17, 2023
  44. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Sorry for the late response. Third Person Motion Controller doesn't care what type of character you use, so your player can have a full body, or just a pair of arms. To get the most out of it, you should also get Ootii's Camera Controller, which has several modes, including 3rd person and 1st person. It also allows switching between them on the fly, so you can play as 3rd person when running around for instance, and switch to 1st person when shooting or interacting with things.
     
  45. ciathyza

    ciathyza

    Joined:
    Aug 16, 2015
    Posts:
    112
    Hi FargleBargle, thanks for the explanation! I already got Ootii's Camera Controller. I probably misunderstand the purpose of Third Person Motion Controller. My assumption was that it already includes a full-fledged third-person-camera controller so using it in combination with another camera controller could be conflicting. But i understand now it is primarily a character controller.
     
  46. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    There seem to be 2 typos in the current download of MotionControllerEditor.cs which produce continuous console errors in lines 663 "ToolbarSeachTextField" should be "ToolbarSearchTextField" and 669 "ToolbarSeachCancelButton" should be "ToolbarSearchCancelButton".
     
    FargleBargle likes this.
  47. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Confirmed the bug and the fix, though I had the 2nd one on line 670 for some reason. I'd noticed this issue earlier when selecting the player, but hadn't gotten around to finding out why, so thanks for solving it. :)
     
  48. KeithBrown

    KeithBrown

    Joined:
    Apr 1, 2017
    Posts:
    191
    I just noticed today that all of ootiis videos are gone from YouTube. That is a shame since they held some great information.
     
  49. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    If the asset is going end of life, please open source it!!!
     
  50. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    It was a massive surprise to me, but I found out a month or two ago that my YouTube account was removed... including all the videos.

    I tried contacting YouTube on YouTube and Twitter, but no reply. Unfortunately, I can't find a backup of the videos either.

    Needless to say, I hate seeing all that work and info gone. I wasn't planning on killing anything, but YouTube seemed to make that decision.

    If anyone happens to have downloaded videos, I'm happy to repost them.


    I did start another channel under "In Meta Labs", but it will take a long long time to recreate the videos. :(
     
    Last edited: Jan 15, 2024