Hi,
When I was using SetLookAtWeight, sometime it caused this weird Jitter below.
Sometime it happen, sometime it doesn’t.
When the window got maximized, it happened less.
Could anyone help me with this? THX in advance.
This is called from LateUpdate()
void SetAimIK()
{
Vector3 pos = unitInputM.GetTargetAimIK().position;
anim.SetLookAtPosition(pos);
BlendAimIK(1.0f);
}
void BlendAimIK( float targetWeight )
{
if( Mathf.Approximately( targetWeight, aimIKWeight ) )
{
aimIKWeight = targetWeight;
}
else aimIKWeight = Mathf.Lerp( aimIKWeight, targetWeight, Time.deltaTime*10.0f );
//Body Head Eye Weight
anim.SetLookAtWeight(aimIKWeight, 1.0f, 1.0f, 0.0f, 1.0f);
}