0 votes
asked in AimIK by (120 points)
how can I change the weight component using a script?

(aim IK)

1 Answer

0 votes
answered by (24.4k points)
aimIK.solver.IKPositionWeight = ...;
commented by
can you be more specific?
after using this command I had an error: "The name 'aimIK' does not exist in the current context"
commented by (24.4k points)

using RootMotion.FinalIK;

public class SetAimWeight: MonoBehaviour {

public AimIK aimIK; // assign this in Editor

[Range(0f, 1f)] public float weight = 1f;

void Update () {

aimIK.solver.IKPositionWeight = weight;



Welcome to RootMotion Q&A, where you can ask questions and receive answers from the developer of Final IK and PuppetMaster and other members of the community.

Post as a guest, create an account or login via Facebook.

Please use the correct category when you post your questions.