- Home /
Using IK to move character's hand position to pickup
I have a character and added a FullBodyBiped component from FinalIK. How can I move the character's hand down to the pickup? This is what I've tried but it just makes the whole character float to a different position.
void PickupWeapon()
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
Debug.DrawRay(ray.origin, ray.direction * 10, Color.red);
if (Input.GetMouseButtonDown(0))
{
if (Physics.Raycast(ray, out hit,3) == true&&hit.collider.gameObject.tag=="Pickup.Weapon")
{
weaponPickedup = hit.transform.gameObject;
//ik.solver.rightHandEffector.positionOffset = weaponPickedup.transform.position;
ik.solver.rightHandEffector.position = weaponPickedup.transform.position;
//weaponPickedup.transform.parent = domHand.transform;
//weaponPickedup.transform.position = domHand.transform.position;
}
}
}
Comment
Best Answer
Answer by Hedonsoft · Oct 05, 2014 at 03:27 PM
Figured it out. I need to use Final IK's InteractionSystem
Your answer
![](https://koobas.hobune.stream/wayback/20220613164419im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
pick up item script issue 3 Answers
Animation importing question 1 Answer
Mecanim ignoring animation poses. 0 Answers
Adapt locomotion system IK to position hands in animation? 1 Answer
Mecanim IK -- Usage? 0 Answers