- Home /
Question by
unity_ZYsHk4nnsD81HQ · Jan 04 at 02:10 AM ·
targetriggingrig
Can't change Rig target from script
I'm trying to change Rig target depending on what object player is holding and it errors
('TwoBoneIKConstraint' does not contain a definition for 'Target' and no accessible extension method 'Target' accepting a first argument of type 'TwoBoneIKConstraint' could be found (are you missing a using directive or an assembly reference?))
ShotGunRigLayer.GetComponent<Rig>().weight = 1;
GameObject.Find("LeftHandIK").GetComponent<TwoBoneIKConstraint>().target = DropWeaponsAreaInstance.DroppableWeapon;
How can I call target?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613051240im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
TwoBoneIKConstraint Target wont update from script 0 Answers
How to reuse character rig? 1 Answer
Can a Bone's Rotation along a specific Axis drive an animaton 2 Answers
Attaching Two Rigs 0 Answers