- Home /
Body Jitter when using SetLookAtWeight
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);
}
untitled-1.jpg
(90.5 kB)
Comment
Answer by rasheedqw · Nov 17, 2014 at 01:36 PM
Had this same problem did some research and found you have to call this from OnAnimatorIK not late update it solved my problem
Your answer
Follow this Question
Related Questions
SetIKHintPosition and SetIKHintPositionWeight seems to have no impact. 0 Answers
OnAnimatorIK Help 3 Answers
What is Avatar.SetIKHintPosition() ? 0 Answers