- Home /
How to Set Animation Position on Slope (animation) help please
How to Set Animation Position on Slope, i already made my player Rotate On Slope using raycast and surface normal it is working perfectly but i can't sync/ set position of animation clip on slope i downloaded that animation from mixamo.com
as you can see with boxcollder and her front foot object is rotating but her back foot is off the ground and also hand
that's how the real animation looks that i downloaded from site
Answer by Fariborzzn · Dec 09, 2019 at 10:35 AM
Hey @unity_2_3_VXKGFGtKtg.. So far everything you've done has been FK (forward kinematic) what you need for position hand on slope is IK((inverse Kinematic) if you dont know the diffrence try : What is the difference between IK and FK in animation
in short for making an animation looks good and dynamic in your game you will need IK Through IK you will set target and weight for hand and hand will attach to ground..
@Fariborzzn okay, do i have to make/ edit this animation somehow? or i can do it in engine with script or something? because animations is not my thing i myself do program$$anonymous$$g and download animations from site
Sure All you have to is from scrip.. Unity Support Ik for left,right hand and foot.. Your Should Do Something Like This: animator.SetI$$anonymous$$PositionWeight(AvatarI$$anonymous$$Goal.RightHand,1); For $$anonymous$$ore Detail Please Go To: https://docs.unity3d.com/$$anonymous$$anual/Inverse$$anonymous$$inematics.html or serach ik unity in youtube
@Fariborzzn Okay thank you i hope it'll get fixed this way thanks