How do I make a inverse kinematic target to exist actor

hi sir,
I follow the tutorial on website, However, I cannot really complete it.

In the figure of tutorial, they show a human look at a ball and the IK would lead the human’s head to follow the ball. It use a “Target” node, which is a Vector3 input. The node seems can only write the vectors in static, not a exist actor. The result it shows are totally different from how the make the graph.

I tried to add a “actor” as parameter, so the IK node can receive the actor.position from the node. But I can’t not find the node between the actor’s position and IK’s input.

which node I should use between the actor input and the IK node, to retrieve the position of actor node?

Instead of an Actor get, change that node to a straight Vector3 parameter get and manage it in script.
Any Actor that you choose to be the head target will have to have it’s position and offset converted into this bone space regardless to have a believable feel.

nanoSoldier Head Look on Vimeo

1 Like

ok , I add following code to control the sphere , now It looks work now

using System;
using System.Collections.Generic;
using FlaxEngine;

namespace Game
    public class changeSpherePosition : Script
        public AnimatedModel target; // animation graph
        public Actor person;  // animation person
        public Actor sphere;  // move the sphere to change IK positon
        public override void OnUpdate()
            var para = target.GetParameter("target");
            var localValue = person.Transform.WorldToLocal(sphere.Position);
            para.Value = localValue;