please how did you allign the gun sights with the camera using IK
That’s pretty specific but the idea is always the same.
The gun has bones because normally they animate.
Add a “sight” bone to the gun, parent it direct to the root bone.
Place the sight bone where it needs to be. The rest of the gun will follow.
A proper IK setup will move everything in place to actually hold the gun, so you shouldn’t have any further concerns with moving the character’s hands. It’s just the gun that is being moved.
Wow that gave me a pretty nice start! Although it is not ideal for situations like dropping down where the speed can be too much for interpolation to catch up. I interpolated on the Z and X axis with a 2D Vector and it looks promising.
Used a virtual bone instead of directly moving the camera though so that hand IK could align with the camera avoiding the shake. Will run some tests and see if I can get a good system ready
Update : This is already usable for regular fps without any weapons and stuff but when I try to do weapons with this the gun is bouncing lot. Any way to keep it aligned in front of the camera. Star Citizen devs said that they used a separate IK for first person and I tried two bone IK which doesnt seem to work. Any ideas?
The camera is attached to the head socket. This can be reduced from Anim graph of character, you have to add transform modify bone just before output pose.
I am facing same problem while making my game. You can watch this video for full tutorial: “https://youtu.be/BNxeXHrBNz0?si=CtJxPGUg_j2c1fho”