How can I rotate my viewmodel's wrists w/ the gun?

Not sure which category as this would include scripting but also help in terms of the bones but;

I’m working on a Bodycam/Unrecord type game. I have a few of their unique features, my favorite is the free aim type thing:

But I want to make the wrists to where the mouse moves rotate like in both games:

(Would recommend watching it at roughly 0.5x speed)
(I know which way to point them, just stuck with the bones rotating and the gun moving!)

My issue is I can’t just rotate the wrists, especially since the gun doesn’t move with them:

And the gun is in three different parts (None move with each other):
image

And so this makes it kind of hard to come up with a solution of just rotating the wrist and the gun. I’ve tried rotating the wrists, and then the gun, but that ends up breaking horribly. I’ve also tried IKControls, but that doesn’t work well without an extremely complicated solution.

Anybody have ideas or solutions. Literally anything will help!

Question how do you move the gun to follow the mouse, like do you do it on 2d way from screen to 3d? if so I recommend hitting the raycasting function a try, raycast from the camera to the mouse.hit or if mouse is not hitting anything multiply camera look vector for 100 studs to get the direction.

2 Likes