Flashlight Pointing IK Not Working as Intended

Experienced programmer and game designer here, I’ve been exploring IKControls as a way of being able to procedurally generate movements for characters without having to animate and script a bunch of things. For the most part, it’s an effective and reusable tool but I’ve hit a roadblock that’s been a growing frustration of mine.

The issue is that I’ve been making a pointing system where players holding an item like a flashlight aim towards the mouse target. Getting the CFrame is easy, and I’ve already setup the IKControl instance automatically with the EndEffector set to the RightHand, the ChainRoot to the RightUpperArm and the target to an attachment I have. For some reason, the RightUpperArm refuses to aim correctly. I have a constraint that limits RightLowerArm rotation cause otherwise it’d bend to point correctly but the RightUpperArm refuses to cooperate.

Does anyone have any clue why it may not be aiming correctly? There’s this rotational offset where based on the distance of the attachment target, the rotation changes so it isn’t static.



add an attachment relative to the hand, set the position to the direction you want it to point, set it as the ik control pole and make sure the attachment is far from the player also you need to also constraint the right upper arm rotation using ballsocketconstraint or hinge constraint not just one part of the arm because it can spin wildly

1 Like