- Home /
UMA- How to increase NPC Avatar Scale?
Pretty self explanatory, but I will go over it anyway. My NPC I created with UMA is significantly smaller then needed. Any way to fix that stuff?
Answer by mkmarek · Jun 27, 2015 at 01:57 PM
Hi, I've been facing the same problem recently.
In my scenario I have a script attached to a Game Object which is taking care of generating UMA character which is then moved as a child object. I guess you have a similar scenario. The problem is when you change scale on that parent object the generated UMA "Root" object will try to compensate that after it generates UMA.
Not sure if this is 100% correct scenario here I go:
umaDynamicAvatar.CharacterCreated = new UMADataEvent ();
umaDynamicAvatar.CharacterCreated.AddListener ((UMAData data) => {
//Set local scale to 1 to be able to modify scale on parent object
data.umaRoot.transform.localScale = new Vector3 (1, 1, 1);
});
umaDynamicAvatar is an instance of class "UMADynamicAvatar" component which I assigned to the parent object.
The key is to reset local scale of the root object to 1 so then setting scale on a parent object will have an effect on the overall result.
Hope it helps!
Marek
Your answer
Follow this Question
Related Questions
2D repeating obstacles with a random Y value 0 Answers
Set bool to different objects with 1 script 1 Answer
Png icon iphone render 1 Answer