Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

Discussion in 'Assets and Asset Store' started by FernandoRibeiro, Dec 24, 2013.

  1. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Tried those with the Skinn tool but the neck of Fernando's high poly is more slender than the neck of the UMA bases and I fear that if we skin using the Fernando bases that we will have issues.
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    We should probably fix that - they need to be 100% compatible, so they can use the same clothes (etc). I wish I wasn't so bad at Blender. Or that Max was less expensive. I have an ancient version that's hardly worth using now.
     
  3. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I highly recommend Maya LT. $30 a month, does everything you need for a game. :) I opened Blender this morning and realized how awkward it was just to delete a row of stuff. lol I know Blender is beloved by many, but my old eyes have trouble with all that tiny stuff on the right hand side. I go into Maya and sigh with relief.

    Blender is powerful but I wouldn't use half of what is gives us and all that stuff just feels like clutter to wade through for me. Of course, it is a personal preference.
     
    TeagansDad likes this.
  4. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    You can easily remove the fluff anyway, it's also heavily shortcut based (though they added some button for the people who complained lately).


    It's the only soft I felt comfortable with, other tend to have wonky logic, while in blender once you learn something somewhere it tend to translate to ant other part so you really learn just a subset and generalize from there.
     
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    As I said, personal preference. :) Blender was my first choice when I decided to learn 3d modeling. I tried and quit out of frustration several times. Tried my daughter's Maya and within a week was making recognizable stuff. So when Maya LT came out, I jumped. Never regretted it. Now modeling is fun for me. So now, going back to Blender to help her...she is a poor student, I find myself lost and frustrated. The outliner is my biggest frustration. So much easier to see and use in Maya.

    It's like any tool. You find what fits your style and most importantly, what is the most efficient for me. Those having difficulties with Blender should try others, especially low cost ones like Maya LT. They might find that they do not hate 3d modeling after all, but that the tool did not match their needs.
     
    neoshaman likes this.
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I hated the small text on Blender also, but then I found out that (unlike UNITY if anyone from UNITY is reading), you can adjust the DPI in the top left of the System tab in User Preferences. I adjusted mine up to 100, and now it looks great on my iMac.
    I'm currently only hating blender because rigging and weight painting is basically horrible. You're supposed to be able to select the bones, and have it automatically assign weights. But it doesn't hardly ever work, and the interface is awful (click the skeleton, switch to bone pose mode, select the bones, click the mesh, switch to weight paint mode, paint weights. To change bones, click the skeleton, switch back, select bones, switch back to weight paint. Uh oh, some vertex wasn't visible, it's not painted, but you can't tell. Press the auto assign. Nothing changes. Give up, complain.)
     
    Teila likes this.
  7. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I think I've asked this before, but are you all sure the female skeleton is correct? Every animation I have where the arms are down, the arms clip through the legs. Before, I got around this by changing the muscle limits to ensure no woman could ever lower her arms very far and then re-exporting the T-Pose but that doesn't seem to be working anymore, and it doesn't really seem like a great solution anyway. Maybe if her shoulders were broader? There doesn't seem to be a way to do that through DNA.
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    The model's shoulders are narrow, so her arms clip through her thighs. Wouldn't this happen with any model designed like this?

    I'm certainly with you on wanting to avoid the clipping. But you're saying that modifying the constraints doesn't work? I thought that was a working solution for people.
     
  9. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I wonder if you could add a bone to allow you to widen her shoulders? Might work. You could then set up the DNA.

    However, try constraints first. :)
     
  10. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Exporting to the T-Pose didn't seem to be working correctly but I just figured out what was wrong and got it working again. Still, it doesn't look great, you can sort of tell that there is a mysterious force in the world stopping women from lowering their arms all the way. ;)

    That would be cool, but adding new bones is still on the "too confusing to figure out" list of UMA features for me. Maybe I can give it a shot though.
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    In terms of modeling and animation and IK ... I'm not sure what else could be done. I'm open to suggestions. :)

    It has nothing to do with UMA, right? It's just that any model with shoulders that are narrow and hips that are wider will have this problem.
     
  12. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hello and happy easter ;)

    one more question, I think this will be my last one for a longer time, until to the unity 2017 update maybe :p

    I am having a Scene where I can dress my Player in realtime, Camera focused on him her, and armor to select.

    The leg example:

    Creating the Player, one time where game starts:

    Code (CSharp):
    1.             if (string.IsNullOrEmpty (trousersSlot){
    2.                 umaData.umaRecipe.slotDataList [5] = slotLibrary.InstantiateSlot (LegsSlot);
    3.                 umaData.umaRecipe.slotDataList [5].AddOverlay (overlayLibrary.InstantiateOverlay (SkinOverlay, SkinColor));
    4.             }
    One time after the Player was created, and each time I Change the trousers / lower I am doing this (followed by a
    UmaData.Dirty(true,true,true); ), my AddClothes void:

    Code (CSharp):
    1.                 if (string.IsNullOrEmpty (trousersSlot)) {
    2.                     if (umaData.umaRecipe.slotDataList [10] != null)
    3.                         umaData.umaRecipe.slotDataList [10].RemoveOverlay ();
    4.                     umaData.umaRecipe.slotDataList [10] = null;
    5.                     if (umaData.umaRecipe.slotDataList [5] != null)
    6.                         umaData.umaRecipe.slotDataList [5].RemoveOverlay ();                
    7.                     umaData.umaRecipe.slotDataList [5] = slotLibrary.InstantiateSlot (LegsSlot);
    8.                     umaData.umaRecipe.slotDataList [5].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleUnderwear01", JeansColor));
    9.                 }
    10.  
    11.             if (!string.IsNullOrEmpty (trousersSlot)) {
    12.                 umaData.umaRecipe.slotDataList [10] = slotLibrary.InstantiateSlot (trousersSlot);
    13.                 umaData.umaRecipe.slotDataList [10].AddOverlay (overlayLibrary.InstantiateOverlay (trousersOverlay, ShirtColor));
    14.             }
    This works every time I create the Player, (he always starts wearing trousers) when both are called.

    But if I Change clothes later, it is not working good. I see somehow the texture is the desired one from the now trousers (or underwear if trouserslot is empty), but sometimes when having clothes (no trouserslot) the underwear shines through, sometimes the underwear Looks just strange when trouserslot is empty.

    Any idea what I forgot?

    Thanks a lot!

    PS: Even if I do use "SkinOverlay" instead of the underwear, the effect is the same, when having a trousers initially it Looks okay, after Dressing to naked and the Dressing to trousers, the trousers overlay is somehow mixed with the naked overlay. And I would prefer underwear, especially on female Player...
     
    Last edited: Apr 16, 2017
  13. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Watch the race videos that Secret Anorak has made. He talks about adding bones to a new race so it should be the same.
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Are you sure something later isn't adding a skin overlay?
    I can only say this really looks complicated. We did all the background work to make this stuff easy if you switch to using the DynamicCharacterAvatar, it tracks all of this for you.
     
    TeagansDad and hopeful like this.
  15. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I honestly don't know enough about animation to say, I'm just a programmer. :p But other games I've played (Skyrim, Fallout 4) have female characters share the same animation as male characters without the hands clipping. How do they do it?
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Usually they tune the animations and have a separate female version. They may even have put colliders in the most troublesome places, and IK the limbs away when they detect a collision.
     
    TeagansDad likes this.
  17. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I'm almost positive that Skyrim and Fallout use the same animations for male and female, because I recall downloading a mod that gave separate anim sets to both and it required a whole lot of nonsense because the game wasn't set up to differentiate by default. It might just be that all the women in Skyrim are broad-shouldered though. All those Nordic genes and daily axe-swinging.
     
    TeagansDad and Jaimi like this.
  18. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Speaking of colliders, maybe there's a hips-width sizing bone that could be used to adjust the size of a collider that could be used for this purpose?

    This has been a chronic problem, so possibly something along these lines could make it into the UMA framework.
     
  19. k-lab

    k-lab

    Joined:
    Nov 10, 2016
    Posts:
    1
    Hi there!
    I got some troubles after update my system with UMA2 today (Unity 5.5.0f3).
    Here is my error message, could anyone help me please?
     

    Attached Files:

  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It looks like it has files from multiple versions in your project - I'd guess because they're in "Assets/downloads" instead of just "Assets". My suggestion is to manually delete the old folders, and import the new one again.
     
  21. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    522
    Hi All,

    I am falling more and more in love with UMA 2.5

    I just uploaded a new tutorial for UMA 2.5 showing how you can easily create your own UMA Materials, Overlays, Slots and again showing how to make a new Wardrobe Recipe.



    If you are looking for how to get UMA 2.5 in to your existing project. I have an example showing how I managed to quickly with relatively no effort, get UMA 2.5 working with the Ultimate Survival kit from the Asset Store.

     
  22. JamesK24

    JamesK24

    Joined:
    Feb 28, 2017
    Posts:
    20
    Speaking of customization of a dynamic avatar DNA... Did anyone manage to limit certain ranges? for example limit the arm length so that your avatar doesn't look like some troll... I've noticed the Human (male/female) DNA humanoid ranges but i don't think this applies to Dynamic dna... I am in the dark here guys..
     
  23. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You can do this either in the DNA (change the way it's applied), or you can load the ranges, and implement the ranges in the code where you apply them - ie, set the DNA value to min + ((max-min) * slider value)
     
    hopeful likes this.
  24. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Equipping weapons on an UMA: SecretAnorak's tutorial recommends attaching to the right-hand wrist bone with a hardcoded offset and rotation; is that what most people do? It seems like a hardcoded offset wouldn't be great because the hand size can change... it would be better to have a mount point transform in the skeleton itself, in the inner center of the hand, whose location would scale with the size of the hand. Is that possible? Or too much effort?
     
  25. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I would mount it to the hand, and put it in a gameobject and adjust the position in the gameobject. But I won't have thousands on the screen at the same time. If you have really tiny hands or really huge hands, the sword as a child will inherit the transform, so it should fit OK either way.
    If you had a real art department (I don't), I would probably make them place mount points on the skeleton, and a mount point on the sword (or whatever), and just match them up in code. But the "cheap and easy" way works too. :)
     
  26. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    If you have the time and inclination, you might check out the docs for the Mount Points plugin. Basically, (IIRC) it puts a GO on the hand (or whatever) and one on the weapon (or whatever), and brings the two together when desired.
     
  27. liuduanbai

    liuduanbai

    Joined:
    Mar 22, 2017
    Posts:
    12
    Hi there! Another question: is Maya recommended while tring to make new slots?
    One of my friends tries to make some new heads but bones seems not right in 3ds MAX.
    We guess that's because FBX files cannot be transformed from Maya to 3ds MAX perfactly?
    So we wish to know what software is used making the "Fem_high_poly_head"? Is it Maya?
    Thank you very much!
     
  28. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I dont know for sure, but I believe they were done in Blender originally. However, maya, max, and others should all work fine. Each one has certain tricks to make it work right - if you're seeing issues, best bet is to ask about the specific issue you are seeing. I've used maya lt, and it's quite good - I was able to make some sandals in it, and they worked fine. Teila uses it also, and recommends it. Secretanorak uses max (and he has a bunch of videos that show how to do it). I just converted a new hair slot using Blender. Not sure what else people are using.

     
  29. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The FBX files were exported from some ancient version of Blender. Some people using other software have had better luck re-exporting them with the new version of Blender before using them.
     
  30. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    Hello guys, if I'm not mistaken, there is a slack channel for UMA, does it possible to have an invite?
     
  31. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Looks like you have direct messages turned off, but if you send me your email address I can invite you onto the UMA slack channel.
     
  32. Deleted User

    Deleted User

    Guest

    Blender Has a Maya theme setting and a 3DS MAX theme.

    Having done weighting in 3DS Max, Maya and Blender, I can assure you, Blender is good in that department. None of the other softwares have such an automatic weight transfer set up which is actually non destructible since it's only a modifier. Copying weights from one mesh to another is pretty easy. (Of course, manual tweaks will be needed, but that's a given).

    Try the "Transfer Data" modifier. Don't get me started on Max's weight painting. I'd only use that if I really had too.

    btw, you can enlarge the properties menu by pressing the - and + on the numpad.

    I like the key system as well. Everything relates to it's actual name ie. G=Grab, R=Rotate etc., and carries over to other areas like UV mapping.

    Once you know one 3D software thoroughly it's a lot easier to move to another. They're all really tools. so it depends which gets the job done to proper specifications (and hopefully the quickest).

    I also like the fact that Blender has everything in one software. You can go from high poly sculpt/sub D modeling to low poly and finished model without leaving the software. It definitely needs more RAM if your going to go really high poly ie. 20 million.
     
    TeagansDad and hopeful like this.
  33. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Will, thanks for that info. My daughter is using Blender but she is having issues with the rig not exporting to Unity. It just doesn't work. I did a test run with the separated UMA and I had the same problem. What export settings do you recommend?
     
  34. Deleted User

    Deleted User

    Guest

    The UMA rig is native to blender so export should work fine. Try FBX 6.1 ascii.

    Import:
    scale 100 (can also scale in Blender export settings), Rig: legacy, No animations
     
    Teila likes this.
  35. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Is there a way to add colliders to each body part so that all the colliders get added when the mesh is combined? So for example a collider on the body and shoes would yield 2 colliders when the uma was built
     
  36. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Hey all, I've been working with UMA 2.5.1 and I must say it's great. Thanks a lot.

    Anyway I'm trying to randomise the clothing colours, but I can't find the shared colours name in the recipe?

    I'm following the code from the sampleCode.cs

    I assume I need to find the shared colour names from the recipe to change the colours?

    Thanks
     
  37. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    We have an UMA physics entension that does this coming out in the next release. If you're still on 2.5 and need it right away you could pick it out of our development branch on github. It's not trivial, but I believe it's just 2 folders you'd have to copy. I know at least one person did it successfully. If you need help with that you can PM me or join our slack channel.
     
    hopeful likes this.
  38. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    oh u used my monster
    i didnt know it was uma compatible:D
     
    hopeful likes this.
  39. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Everything is UMA compatible. (Pretty much.) ;)
     
    Mister-D likes this.
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Another thing that's important is to set the "Forward" to Z-Forward, and UP to "Y-UP" (if it isn't already). Then my blender exports work fine.
     
    hopeful likes this.
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I know we already talked about this in slack, but if anyone else is needing this information, you can pull the colors from the avatar with the CurrentSharedColors property on DynamicCharacterAvatar (which is just a shortcut for umaData.umaRecipe.sharedColors). However, these are only valid after the character is built.

    If you want, you can precreate colors on your avatar properties to be assigned at build time. These colors are available in the ActiveColors property. However, this will not include any shared colors from recipes that are dynamically added.
     
    derkoi likes this.
  42. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    It's me :). After having installed the patch 03, the UI works perfectly in the UMA UI.

    I have installed the newest UMA from GitHub and I try to use the created character as a third person character. I do as before and the created avatar doesn't work. It jumps and hover in the air (as if he was sitting in the air). Using the arrows keys for input, the character moving around only according to the direction I think. I added ThirdPersonAnimatorController in THREE slots... Why do I need to do that in the three slots?!!! Two in the Dynamic Character Avatar script and one in the Animator component. Why not only one?
     
  43. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Thanks, I have it working great now.
     
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Using DynamicCharacterAvatar, there is a simpler process to do this.

    But first, you have to fix a couple of bugs in Unitys third person controller script.

    I'll outline what needs to happen here in full, in case anyone else wants to add third person controller support.


    After importing UMA and the "Characters" package from Unity, load up the "UMA DCS Demo - Simple Setup" scene.

    Find the "UMADynamicCharacterAvatar" in the scene, and add the "Third Person User Control" script to it. That will add all the pieces that it needs.

    On the Capsule Collider, set the "y" center to 0.5.

    Next, you need to fix some "issues" in ThirdPersonCharacter.cs (having to do with not honoring the "Ground Check Distance" property, and we need it to do that.

    So go to the "HandleAirborneMovement()" function (around 162 in mine), and find the line that says:

    M_GroundCheckDistance = m_Rigidbody.velocity.y < 0 ? m_OrigGroundCheckDistance : 0.01f;

    and comment that line out like this:
    // M_GroundCheckDistance = m_Rigidbody.velocity.y < 0 ? m_OrigGroundCheckDistance : 0.01f;

    The next function below that should be "HandleGroundedMovement()". the last line in the if needs to remove the constant, and set it to the saved version (line 175 in mine):

    Find where says this:
    m_GroundCheckDistance = 0.01f;

    and change it to this:

    m_GroundCheckDistance = m_OrigGroundCheckDistance;// JRRM - fixed

    Save the file, and you only need two more changes.

    Go to the "Third Person Character" component on your DynamicCharacterAvatar, and change the "Ground Check Distance" to 0.2

    Then go to the DynamicCharacteravatar component on your avatar, and (under "Race Animation Controllers", set the default animation controller to "ThirdPersonAnimatorController".

    Press run - you should be running around!
     
    Last edited: Apr 28, 2017
  45. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    Thank you for your detailed explanations. Alas, the same problem. What with ThirdPersonAnimatorController?

    I have a Rigidbody component on a DynamicCharacterAvatar with the option isKinematic switched on because I experience the strange Avatars behavior I described before. Maybe it is important.
     
  46. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Are you talking about Opsive's Third Person controller or a general 3rd person controller?
     
  47. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    The general one. From the Standard Assets. The anim stopped the flow on the Airborne anim. I use not the Simple Example Scene, but the advanced one with Asset Bundles. I have a script added to the avatar that adds ThirdPersonUserControl (I used UMAThirdPersonUserControl before). and other stuff. I dragged ThirdPersonAnimatorController to the three slots instead of the default one.

    AvatarProblem.png
     
    Last edited: Apr 28, 2017
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I missed adding that you needed to set the Capsule Collider center to 0.5 (otherwise, he's standing in the air).

    Here's what the setup looks like for me:

    I Set the "ThirdpersonAnimatorController" as the default anamationcontroller (that's from Unity's Character package), and then didn't include any additional recipes. (The capsule collider is already there, and you can remove it if you want, but I didn't bother. The character will already have a capsule collider on it)

    3rdperson-1.jpg

    And here's how the third person character is configured, with the capsule collider center set, and the GroundCheck set:
    3rdperson-2.jpg

    You might verify that you didn't get any compilation errors in your project after updating the script, as that script has a bug in it that won't let you set the GroundCheckDistance, and we need that.

    edit: After setting the capsule collider center y, you can actually lower the GroundCheckDistance to 0.2, and it will work better.
     

    Attached Files:

    Last edited: Apr 28, 2017
  49. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    1/ I use the example scene with asset bundles. I guess the steps are very similar
    2/ When I click on the DynamicAvatar in the Hierarchy, Unity is frozen for a couple of minutes and I work slow (I think it is not a problem of UMA, but some legacy things or maybe because of the complexity of the project). But it always happens when I click the DynamicAvatar, but not with other items in the Hierarchy. And then, when Unity is unblocked, scrolling components in the Inspector for the DynamicAvatar is very slow (some lags). It's irritating, but I am forced to live with it.
    3/ The collider plus the rigidbody on the avatar push it forwards, so I use IsKinematic switched on (my movies recorded on the UMA GitHub below issues)
    4/ The collider is added automatically and the hight of the collider is 2 and the center is 1. Should I comment out the code in the CapsuleColliderSlotScript script and add the collider manually to the avatar with the settings you showed me?
    3/ I understand that ThirdpersonAnimatorController should be only in the Deafult Animation Controller slot and in the Animation Controller slot and in the controller slot of the automatically added Animator MUST be Locomotion with Head.
    4/ I press WSAD or arrows and the avatar does not move - just rotate.

    This is my custom script that is added to the Avatar by me to handle some thing (gameObject is the Avatar):

    Code (csharp):
    1.  
    2.  
    3. using System.Collections;
    4. using System.Collections.Generic;
    5. using UnityEngine;
    6. using UnityStandardAssets.Characters.ThirdPerson;
    7.  
    8. namespace MF3D{
    9.    public class CreateThirdPersonPlayer : MonoBehaviour {
    10.  
    11.        public Transform startPlayerPosition;
    12.        private Vector3 getAvatarLocalPosition;
    13.        private Vector3 getAvatarLocalRotation;
    14.        private Vector3 getAvatarLocalScale;
    15.  
    16.        // Use this for initialization
    17.        void Start () {
    18.            getAvatarLocalPosition = gameObject.transform.position;
    19.            getAvatarLocalRotation = gameObject.transform.localEulerAngles;
    20.            getAvatarLocalScale = gameObject.transform.localScale;
    21.        }
    22.  
    23.        // Update is called once per frame
    24.        void Update () {
    25.            if(Input.GetKeyDown(KeyCode.P)){
    26.                gameObject.AddComponent<UMAThirdPersonUserControl>();
    27.            }
    28.    
    29.        }
    30.  
    31.        public void OnSetPlayerAvatar(){
    32.            //gameObject.AddComponent<UMAThirdPersonUserControl>();
    33.            gameObject.AddComponent<ThirdPersonUserControl>();
    34.            gameObject.transform.parent = null;
    35.            gameObject.transform.position = startPlayerPosition.position;
    36.            startPlayerPosition.gameObject.SetActive(false);
    37.            //gameObject.tag = "BuildItem";
    38.        }
    39.  
    40.        public void OnCustomizeAvatar(){
    41.            gameObject.transform.position = getAvatarLocalPosition;
    42.            gameObject.transform.localEulerAngles = getAvatarLocalRotation;
    43.            gameObject.transform.localScale = getAvatarLocalScale;
    44.            startPlayerPosition.gameObject.SetActive(true);
    45.            Destroy(gameObject.GetComponent<UMAThirdPersonUserControl>());
    46.            //gameObject.tag = null;
    47.        }
    48.    }
    49. }
    50.  
    51.  
    EDIT: I have only an Idle animation. Why? I would like to use all default third person controller animations.

    The avatar isn't in the air anymore but I have only the Idle anim. I guess this is the reason why WSAD and arrows don't work. No locomotion anims. Is the Idle anim is for the Locomotion with Head? So now the question is how to assign the default Third Person Controller with aniamtions to the avatar.
     
    Last edited: Apr 28, 2017
  50. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    1. On your avatar, open up the Race Animators, and delete them all. It has an entry in there for "Human Male DCS" which is overriding the default.
    2. Try setting up the avatar exactly like the pictures above (iskinematic off, etc).

    It should work - it works for me.

    If not, I recommend (for testing purposes) to switch to the Simple Scene, add the third person controller according to the information above, and see if we can get it to work that way. If so, switch back and try to see what setting is different. You don't need to have an event to enable all that stuff, it should just work when you put it directly on the avatar.