I'm using Unity3d and I'm trying to rotate the left leg bone of an avatar but it is not working although scaling is working well.
This is the code used for scaling and is working perfect:
r.localScale += new Vector3( 0.1f , 0.1f , 0.1f);
and these are my attempts to is the code of rotation but not working:
r.eulerAngles = new Vector3(10, 10, 10);
r.rotation = transform.rotation * r.rotation;
where r is the transform of the left leg.
EDIT:
This is my file.
So this doesn't work when I'm using the Update
function, like nothing happens to the avatar.
If I used LateUpdate
function, I can see the rotation made but then flickers back to the old position, I wonder how to apply the rotation to all the remaining frames as well.
If anyone could please advise