BodyItem(Kick) not dealing damage & Prioritate kick over walking

Grannyboy

Active member
I recently added a new kick to my game since (no offence) the original kicks provided in the package is a bit wonky. I did so by simply add to the Body in the Full body layer, see 1st picture below.
The transitions can be seen as picture 2.

My issue now is the hitboxes wont register any hits on my enemy. Even tho my legs with the hitboxes added clearly goes enters the enemy. (I set up the hitboxes exactly after this video: https://opsive.com/videos/?pid=923&video=3936 )

EDIT: See the gif down and note that I have added a force on impact. So if the hit registers (which it does rarely) the zombie will fly backwards a few meters.

Question 2: When I walk and press kick, the character does not kick untill I stand still. How can I prioritize so that my kick shoots over my walking?


KickAnimator.PNG
Picture 1.

KickTransitions.PNG
Picture 2.
 
Last edited:
I noted this Gizmo in the scene view, and when this red line appears I can kick the enemy. Is there a way to cuztomize this "range"? The line only appear when im basically standing exactly on top of the zombie:
KickGizmo.png
 
One way to debug this would be to place a breakpoint within MeleeWeapon.UseItemUpdate and see if the hitboxes collide with anything. You may need to increase the size of the hitbox.
 
One way to debug this would be to place a breakpoint within MeleeWeapon.UseItemUpdate and see if the hitboxes collide with anything. You may need to increase the size of the hitbox.
You were absolutly right, the collider needed a quite huge size increase to get the result I wanted!
KickHitBox.PNG

Is there some sort of event firing when you use the BodyItem weapon? I really want to prioritate so that when I run and press "Fire1" to kick I want the kick to fire instead of my character doing this:

Note the wierd twitch he does with the left shoulder instead of the kick. I post a link to the video with sound here aswell:

So basically my question is: Is it an event fired when BodyItem is fired? And can I some how override my walk/run animation with the kick isntead when its fired?

Im sorry if this question is formulated super wierd.
 
Make sure that "Allow Position/Rotational Input" are both enabled on your Use ability:

1631265440870.png

If the kick is still forcing your character to stop moving, then there must be an animation issue. I'm not 100% sure on the specifics, but one thing to check would be root motion - e.g. if your body MeleeWeapon has "Force Root Motion" enabled, then you may need to look at your animation's Root Transform settings in its import settings (on the "Animation" tab).
 
Make sure that "Allow Position/Rotational Input" are both enabled on your Use ability:

View attachment 7105

If the kick is still forcing your character to stop moving, then there must be an animation issue. I'm not 100% sure on the specifics, but one thing to check would be root motion - e.g. if your body MeleeWeapon has "Force Root Motion" enabled, then you may need to look at your animation's Root Transform settings in its import settings (on the "Animation" tab).
I think you missunderstood me. I want the kick to stop my character when I use it while moving! Now my character just twitches and the kick animation wont play properly.
 
Make sure that "Allow Position/Rotational Input" are both enabled on your Use ability:

View attachment 7105

If the kick is still forcing your character to stop moving, then there must be an animation issue. I'm not 100% sure on the specifics, but one thing to check would be root motion - e.g. if your body MeleeWeapon has "Force Root Motion" enabled, then you may need to look at your animation's Root Transform settings in its import settings (on the "Animation" tab).
And the positional input makes it so that I cant move while kicking, which is good! But I still need the kick animation to be prioritized over walk animation when walking.
 
Ah I see.

In that case it's likely an animator setup thing - I'm still super well-versed in animators & transitions, however from your screenshot I can see you've got Moving=false as a condition for your transition, maybe you should try without this condition, as I'm not sure if Moving gets set to false early enough for it to register and transition to the new state. You might also want to check the interrupt settings on your transitions, e.g. the transition to the kick state might be getting interrupted by the movement transition.
 
Ah I see.

In that case it's likely an animator setup thing - I'm still super well-versed in animators & transitions, however from your screenshot I can see you've got Moving=false as a condition for your transition, maybe you should try without this condition, as I'm not sure if Moving gets set to false early enough for it to register and transition to the new state. You might also want to check the interrupt settings on your transitions, e.g. the transition to the kick state might be getting interrupted by the movement transition.
That was absolutly correct! I just copied the original transition and replace the ItemSubStateIndex to my own kick and didnt realise what that condition affected.

All good now, thank you!
 
Top