IKControl for LookAt motion

I am trying to make my roblox character look at the mouse. I am using CFrames, and it looks fine. However, CFrames are EXPENSIVE. Is there a way to make it the same, but using IKControls?

2 Likes

IKControls have a built-in property called Type.. All you need to do is set up a rig with IKControl and set Type to “LookAt” (more precisely, Enum.IKControl.LookAt, if you want to do that via script). Usually you would set the torso as ChainRoot and the Head as EndEffector and use an Attachment in Workspace as the Target.

1 Like

Can I put the EndEffector on the HumanoidRootPart and the ChainRoot to the Torso?

Wait that actually worked lol. I didn’t expect that..

That worked, but I don’t want the head to rotate more than the torso. I want the head to be the same rotation as the torso.

You could use constraints (like HingeConstraints or BallSocketConstraints) to limit the movement of the neck along one axis. The IKControl instance will automatically respect the limits you set.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.