Dual Wield Item Equip States

r4opsive

Member
There is an Animation Event Trigger:


For equip and unequip this is set on the Character Item component.

I have a similar question. I created dual pistols, using the demo animations / animation controllers, etc. It's working correctly... Anyway my question is regarding the differences between the "Equip from Aim" vs "Equip from Idle" states in the animator controller. With the demo, it seems like when you equip/unequip from aim, that the left arm animation plays slightly delayed after the right arm. I'm guessing this was done on purpose? So, if there's a setting controlling this, how could I change it so that both arm animations play at the same time? I'm having trouble finding where to adjust this...
 
By the way, in this I'm allowing the camera to zoom while using dual pistols. Maybe this has something to do with whatever setting is delaying the left arm animation?
 
I am not sure - tagging @Sarah. There aren't any settings within the controller which allow you to move one hand quicker than the other. It's all animation based.
 
Oh also, I'm using a custom equip/unequip animation (an idle animation where both arms move at exactly the same time). I'm using the same animation for the "left arm layer" and "right arm layer," so, it seems like they should move at the same time in game. And, I'm using the Dual Pistols item set rule from the demo.
 
Are you in first or third person? If you are in first person do you have the single arm setup or do you have an independent left and right hand? If you have independent hands then there could be some difference - you'll want to check the springs on the First Person Perspective component to ensure they are the same.
 
This character that I set up is only in 3rd person. And it's one single character model. Out of curiosity, what do you mean by "springs?" Could you post a screenshot of where this is on that FPS component?
 
Oh and, what I meant originally by zooming the camera, is while in 3rd person, holding the aim key (right mouse button), with "allow zoom" enabled for dual pistols.

I'll test the demo scene character later, to see if the same thing happens. And I'll try to upload a video..
 
Out of curiosity, what do you mean by "springs?" Could you post a screenshot of where this is on that FPS component?
It's on the first person perspective component:

1673650361467.png

If you are in a third person perspective there are two things that control the hands:
- Animations
- IK
One thing to test would be to set the hand/upper body IK weight to 0 so then it's completely driven by animations. There are no other scripts that affect the third person hands.

Oh and, what I meant originally by zooming the camera, is while in 3rd person, holding the aim key (right mouse button), with "allow zoom" enabled for dual pistols.
You can use the preset system to disable zoom when the dual pistols item set is active.
 
It's on the first person perspective component:

View attachment 10183

If you are in a third person perspective there are two things that control the hands:
- Animations
- IK
One thing to test would be to set the hand/upper body IK weight to 0 so then it's completely driven by animations. There are no other scripts that affect the third person hands.


You can use the preset system to disable zoom when the dual pistols item set is active.

Thanks for the info. I'm still looking for a solution. Here's a video to show better what I'm talking about:
 
Also, I made sure that the transition durations and exit times were identical for all 4 animations. I forgot to show this in the video:
Screenshot Animator Controller.png
Screenshot Animator Controller 2.png
 
Oh, and I did see how to disable zoom, but I'm wanting it to zoom for dual guns in the same way that it zooms for a single gun.
 
Also, I just tried adding the "Atlas" model as "Character Model 2" to see if maybe it's something to do with my character model, but the same thing happens with the animations while zoomed in. :unsure:
 
By the way, I'm not 100% sure I've set up the character and weapons correctly... I'm still learning more about v3 and the controller in general...
 
The way I set up the input is that the right mouse button zooms in (like the other guns) and the left button fires both guns.
Another thing I haven't tried yet, but I'd like to figure out, is if I could have the guns alternate firing. So, the first time you press the shoot-key, the right gun fires, then the second time you press the shoot-key, the left gun fires... then back and forth. I'm assuming the code might have to be altered for that to work?
 
Since you've set the IK to 0 that's an animation issue. I would try creating a new animator controller and isolating it to just the animations that you are using. That should allow you to debug better than having to look through a massive animator controller. If it's a problem with the included animations we can look at updating them but it'll be lower priority since it's considered demo content.

Oh, and I did see how to disable zoom, but I'm wanting it to zoom for dual guns in the same way that it zooms for a single gun.
You can use the state system for dual wielding just like single items - it's just a state on the item set.

Another thing I haven't tried yet, but I'd like to figure out, is if I could have the guns alternate firing. So, the first time you press the shoot-key, the right gun fires, then the second time you press the shoot-key, the left gun fires... then back and forth. I'm assuming the code might have to be altered for that to work?
Yes, this will require you to create a new use ability to decide which item to activate next.
 
Thanks for your replies. I wouldn't worry about spending time with this on your end. If I eventually figure out what's causing this I'll write about it here.
 
Top