Search Unity

When you rotate the character bones over the Vector3 variable, the character is rotating delay

Discussion in 'Animation' started by UMURAS, Sep 18, 2021.

  1. UMURAS

    UMURAS

    Joined:
    Jun 15, 2019
    Posts:
    18
    Hi all,

    Transform skeleton;

    public Vector3 offset;

    void Start()
    {
    _animator = GetComponent<Animator>();
    skeleton = _animator.GetBoneTransform(HumanBodyBones.Chest);

    }

    void LateUpdate()
    {
    skeleton.rotation = skeleton.rotation*Quaternion.Euler(offset);
    }

    With this code, when the character is returned over the offset variable through the inspector, the character is rotating with delay. What could be the problem?

    Please, help me.