- Home /
Move an avatar with C#
I tried to move the different bones of an avatar using for example: bone.transform.position = new Vector3(positionX, positionY, PositionZ). The problem is that the avatar moves correctly but it deforms
What do I have to do to prevent it from happening?
Answer by hec_91 · Jan 08, 2019 at 12:14 AM
Well, you shouldn't :)
If you just need to move the arms or the hands, try using empty GameObjects as IK targets for the hands and move those.
In case you need it, this documentation page is a good place to start with IK, but I'm sure there are plenty of resources and tutorials around.
Answer by Cornelis-de-Jager · Jan 07, 2019 at 09:48 PM
Add the avatar as a child of an empty gameobject. Call the object player. The avatar can be called Model. Then simply move the player game object and it should move the avatar correctly. Don't try to move the bones, let the animator take care of that.
Your answer
![](https://koobas.hobune.stream/wayback/20220612185313im_/https://answers.unity.com/themes/thub/images/avi.jpg)