Melee Weapon Attack Problems

When I run the game everything works fine, when hit the attack button to swing my weapon it works normal 1-2 times then it does this, WeaponAttackProblemImage.png

My characters arms dis-attach from the body, at least that's what it looks like. but no buttons work I can just turn in circles. there are no errors in the console so I don't know what happened ?
Any help would be appreciated
 
You can use the state system to adjust the IK weights when you are using a melee weapon. Take a look at this video:

 
Also looks like an animator problem in the transitions, if the character stays that way. (I've been there ?)

If the animation doesn't use combos, check that it can transition to self (also check the use rate in Use item ability)
 
Also looks like an animator problem in the transitions, if the character stays that way. (I've been there ?)

If the animation doesn't use combos, check that it can transition to self (also check the use rate in Use item ability)

Okay so I don't know how to transition to self, because to make a transition I have to have another animation right? so how do I transition to self?
 
1584036296505.png

Try setting it in the transition from "Any State" to your animation

Edit: Be careful, if your conditions aren't correctly applyied or the animation is (for example here) idle, then you'll only see the first frame of the animation, because it will restart continously.

This is because the Animator will detect that the condition is valid in each frame, then will interrupt the animation and restart it over and over.

Edit 2: https://www.opsive.com/forum/index.php?threads/body-item-animator-stuff.1986/#post-10092

Here Sarah and Justin helped me about some problems with my Animator. If my suggestion doesn't work, maybe there is something that you can use
 
Last edited:
thanks for the help so far, I set the animation to Can Transition To Self, which half worked. my characters arms still detach but they return to normal of a few seconds, so that is helpful.

I tried changing the Use settings and I tried using the parameters in the state machines, I don't know what to change any of these things to, but everything I have tried so far hasn't helped anything the arms still detach when I hit the attack button the same as always, which makes me wonder if it could be something else causing the issue.

in my attempts to fix the problem I did notice that the arms react differently depending on what direction I'm facing, If someone could tell me how to upload or attach a video to this thread so I could show you exactly what is going on I would appreciate it. (and If I just have to link it I can do that i was wondering if I could put a video on the page)

thanks
 
my characters arms still detach but they return to normal of a few seconds, so that is helpful.
So they are still appearing similar to the image above? This is definitely something that is related to IK. Did you add the state to the CharacterIK component which will change the weights when the melee weapon is active?

If someone could tell me how to upload or attach a video to this thread so I could show you exactly what is going on I would appreciate it. (and If I just have to link it I can do that i was wondering if I could put a video on the page)
You can't upload videos, but you can link to them from a site such as streamable.com.
 
thanks for the help so far, I set the animation to Can Transition To Self, which half worked. my characters arms still detach but they return to normal of a few seconds, so that is helpful.

As Justin says, create a preset with hand weight 0 in Character IK (Be sure that it's name is the same that your item "state name" so it can be activated).

1584534631479.png


if I could put a video on the page)


You can also record a gif and upload to imgur (Screen to gif is the software that i use)
 

okay i think that should show the problem, i'm still going to work on the state system myself and hope I can figure something out.

just so you know (the video shows this) but it seems that no mater what direction I'm facing the animation tries to play forward as if the character was facing away from the camera like normal but its not.
 
Thank you, that did work. the animation plays normal now, I do want to say that I tried that before but I just haven't tried it in connection with "Can transition to self" because without that I got some odd results but with "it" it works perfectly. I guess I didn't realize how the small things make such different results.

So I do have a "part 3" to my problem, my characters arms still freeze up on occasion, but now that the Light Attack animation plays right I think I figured out why it freezes I just don't know how to fix it.

Let me try and explain, I think that when I hit the button a few times that it tries to load the 2nd Light attack animation (which I assume is connected but with the first animation not playing right I haven't tested until now) but instead of loading the second animation it freezes. The arms freeze basically straight down and stay there, I think because the 2nd animation doesn't load the arms are stuck in "limbo" cause with no animation they have no return to idle. So how do you suggest I fix this?

Thanks for the assistance.
 
Let me try and explain, I think that when I hit the button a few times that it tries to load the 2nd Light attack animation (which I assume is connected but with the first animation not playing right I haven't tested until now) but instead of loading the second animation it freezes. The arms freeze basically straight down and stay there, I think because the 2nd animation doesn't load the arms are stuck in "limbo" cause with no animation they have no return to idle. So how do you suggest I fix this?
It sounds like you'll need a new transition. Debugging the animator is always sort of a pain but I approach it by first determining if the animator parameters are what I would expect them to be. If the parameters are what they expect them to be the next step is to look and see what state the animator is in. If the animator is in the incorrect state then it likely needs a new transition based on the current parameters.
 
Let me try and explain, I think that when I hit the button a few times that it tries to load the 2nd Light attack animation (which I assume is connected but with the first animation not playing right I haven't tested until now) but instead of loading the second animation it freezes. The arms freeze basically straight down and stay there, I think because the 2nd animation doesn't load the arms are stuck in "limbo" cause with no animation they have no return to idle. So how do you suggest I fix this?

Also if you have another animation asociated you have to disable "can transition to self", allow combos and checkout animator clips in the melee item. When the animations ends, the Animator will go to the idle state (because your attack animations -should- be attached to an "exit" state)

You should really take a look how the Demo Animator is made
 
so first I copied the demo animator and have been using it, that's why I don't understand why it doesn't transfer to the second attack animation because it works in the demo but I will see what I can do about creating a new transition with different perimeters like Justin said and also try disabling can transition to self and hope it works thanks
 
I tried what was suggested and by unclicking "Can transition to self" my arms no longer freeze downward. but now when I hit the button the 2nd time the character freezes in Idle for half a second then returns so I can continue moving I tried changing some parameters and making a new transition but it still freezes and I also made sure everything was attached to the exit state.

which parameters should I be focusing on and could parameters in other layers be conflicting?
thanks
 
If you switch your character to use the included animator does it work correctly? If it still doesn't then it's likely a difference in your melee weapon use settings. This can be adjusted through the Animator Audio State Set.
 
It worked, somehow my second stat (3) got removed don't know why but now that I added it back the second animation plays but now theirs a funny delay I don't know where comes from


this video shows the delay, the first attack works immediately like it is suppose to but the second one does nothing for a while then all of a sudden plays, this might be a simple fix but I just have no Idea why it happens

and I am using the opsive animations, I figure since they work on the demo I could learn how to use them first before changing to my own. thanks
 
That is probably related to the use or use complete event. Take a look at this page for how the attack system works (under combos):


It could also be related to the Use Rate on the MeleeWeapon component.
 
Top