Adjusting Arms to Weapons

MikeGro

Member
I watched your Third Person Weapon Setup on Youtube here:
and I do have the weapon showing up in Third person... and adjusted the weapon's positioning so it's at least pointing straight... and on line, etc. but I have a couple of questions:

1. I assume to get the rifle to shoot, reload and eject - this is the correct video to watch:

Is that correct?

2. When my character is in aim "mode"... ie. aiming with the rifle... the character's right hand is a bit too far back from the pistol grip... what is the best way to adjust that so I don't mess up the model's settings with every other animation like walking, idel, etc.? I own the assets of UMotion Pro and Bio IK - do I need to use something like those assets? Also, the angle of how her shoulder/arm is a bit off too when in aim mode? This isn't an issue with your asset... just wondering what is the best method to make those kind of corrections and adjust the body/arms/head positioning?

Thanks.
 
1. That's correct.

2. Ideally you'd have your own animations that match the character's rig. You can also set the non-dominant hand position on the item so it'll use IK for that hand. I'll add more details to the docs if it's not already in there.
 
I didn't see the IK stuff in the docs... but I could have missed it.
Which animation or animation controller actually brings the weapon up to aim... I can't seem to find it.
 
warrenHandPosition.jpg

I took this screenshot to better explain my challenge and to see how it can be done... or if you can point me in the right direction as it's something I need to learn to do because I'm sure most weapons, animations and models don't all match up perfectly and need to be adjusted. I would imagine a lot of people who are new or semi-new and/or learning Unity would love to learn this as well.

If you look at the attached image... that's my player with an Assault Rifle in Third person... and is in "aim mode."

The white arrow is pointing to the magazine where the left hand should be gripping. The yellow arrow is pointing at the left hand. How do I move the left hand so it's gripping the magazine?

Also... the green arrow is where the weapon should be - ie. the player should be looking down the sites... as you can see, it's a little bit lower than where it needs to be. How do I adjust it so the rifle is position where it should be... ie. so it looks like the player is looking down the sights and the left hand is gripping the magazine?

I realize that Opsive isn't responsible for us knowing how to do this... and the controller is flexible and probably not responsible for the positioning per se... but any help, guidance or pointing in the right direction would be very helpful and much appreciated.

Thanks.
 
Thanks for that link and I put in an empty gameobject, named it IK Target and is a child of the AssaultRifle... but then what?

Also, it put that object in the middle of the character - I assume I position it where I want the left (non-dominant) hand to be? If so... then how do I get the hand to position where I want? Your document doesn't really go into that... it stops after putting in the gameobject.

I'm thinking that I need to Drag that IK Target object I created with the Transform into a slot on the character controller... but can't find it on the controller.
 
I did find the Third Person Perspective Item component on the Items/AssaultRifle component (not the one that is created on the characters spline hierarchy and all of that but the other one that just says Items and has Assault Rifle in it and nothing else). I put my GameObject I called IK Target, which I position where I Want the non-dominant hand... in the Non Dominant Hand IK Target section of the Third Person Perspective Item and it did move the hand but not exactly where I wanted it and it was distorted so I'm doing something wrong. I played around with the position and all of that of the IK Target and it just made it worse. And it seems you can't really put the game on pause, adjust the IK Target Transform position to see the hand update live like how you can with the positioning the weapon so it's a bit tough to do.
 
That is the correct field. You should position it to the at the assault rifle's handle. In this case you don't need to modify the Character IK component. This field will be moving the hand bone so it may be a little off from the precise location that you want to add it. You can adjust it in realtime by having the character always aim so you can then position it.

https://opsive.com/support/document...oller/character/abilities/item-abilities/aim/
 
I wasn't modifying the Character IK component... I just called the new gameobject as your doc did.

To clarify, I should create a GameObject, position it on the handle and in the hierarchy I should place that new gameobject as a child in the AssaultRifle stack that is where the right hand is... and then put that gameobject in the Third Person Perspective item component -> Non Dynamic Hand IK Target section in the other items/AssaultRifle stack?
 
Last edited:
If I were to change the animation for Aim, which animation is it? I can't seem to find it... and usually when I play a game and open up the Animator, I can see it "working" - which layer and such is it in? I looked everywhere.
 
To clarify, I should create a GameObject, position it on the handle and in the hierarchy I should place that new gameobject as a child in the AssaultRifle stack that is where the right hand is... and then put that gameobject in the Third Person Perspective item component -> Non Dynamic Hand IK Target section in the other items/AssaultRifle stack?
That is correct.

If I were to change the animation for Aim, which animation is it? I can't seem to find it... and usually when I play a game and open up the Animator, I can see it "working" - which layer and such is it in? I looked everywhere.
@Sarah can provide a better answer but I think that it is on the item or upper body layer. This page describes how the animator is setup:

https://opsive.com/support/document...roller/animation/animator/animator-structure/
 
I can get it in idle to have the hands hold the grip but if I move (Third person) or the player aims... the arms don't line up any more... so, kind of stuck. I would imagine most animations, models and weapons don't line up from the start and has to be adjusted... so, whatever the solution is... I'm in search of one otherwise, I can't really use the controller.
 
I just tested it and used IK to position the hand with the assault rifle. When I tried that the hand stayed in he same position when the character moves.
 
I can get it in idle to have the hands hold the grip but if I move (Third person) or the player aims... the arms don't line up any more... so, kind of stuck. I would imagine most animations, models and weapons don't line up from the start and has to be adjusted... so, whatever the solution is... I'm in search of one otherwise, I can't really use the controller.


Hello, were you able to solve this issue, i am running into a similar problem. i cant get the weapon and arms to match with the first person view, third person is ok. but the first person has issues similar to what you have with third person, though im using FPS Mesh Tool so it is like im treying to battle third person into first person.
 
Hello, were you able to solve this issue, i am running into a similar problem. i cant get the weapon and arms to match with the first person view, third person is ok. but the first person has issues similar to what you have with third person, though im using FPS Mesh Tool so it is like im treying to battle third person into first person.

I haven't circled back around to sort it completely out yet... but I purchased Final IK from the asset store which from what I researched and checked out a little bit, should do the trick. The issue you and I are having would occur with any controller (not just Opsive's assets), character model and weapon so I figured I might as well buy Final IK, which I did during the holidays.
 
I have had final IK for a long while but only just got around to using it. It works perfectly for 3rd person. But I'm not sure it will work for first person. Essentially I would like to parent the arms to the weapon and move the weapon and arms around for scoping. But hVent figure that out yet as first person is messed iP for me
 
According to the person who made Final IK - it should work regardless of first person or third person because it simply adjusts the limbs to the weapon. If I were you, I would go on to their forum (makers of Final IK) in the unity forums and ask him about it... he made a quick demo for me when I asked him about a solution for my issue. From what I can gather... when you line it all up using Final IK... then it's all lined up - regardless of the camera view (ie. be it 3rd or 1st person). In other words... if the hands are in the right place... how the camera is positioned shouldn't matter.
 
and if you do go ask that question in the Unity forums for Final IK, let me know what he says about your specific issue... it may save me some time too. I'm not an expert in Opsive or Final IK... just know what I know based on what Opsive, the Final IK developer and a few others have told me... and from the one example he made for me. I tried to upload the demo file the Final IK developer made for me so you can see how he did it... but this forum wouldn't let me do it.
 
Top