Player Character not taking damage from the front in melee

AJ_Dubya

New member
Hi there,

As the title suggests, I am having an issue where the player character does not receive damage from the front while holding a melee weapon and being attacked by a melee weapon at the same time. Neither the Aim or Block abilities are active, and the Shield component on the weapon is set to 'Require Aim', yet still no damage is being taken, however if I turn the Player to the side or have my back facing the attacker then he receives damage. Also, the Block ability Start & Stop Types are set to Manual. This issue does not affect AI characters, just the Player, and only when the weapon has the Shield component. I notice this happening in the Demo scenes as well. There are no console errors appearing.
Any ideas what might be the problem?

Edit: If it helps, I have the First Person Controller, Ultimate Inventory System, and Behaviour Designer

Thanks!
 

Andrew

Moderator
Staff member
Hm, yes I can confirm this happens in the demo scene too.

@Justin If I'm not mistaken this is happening because the enemy's melee weapon collides with the character's Shield object first (even if it's not Aimed), which doesn't have the Health component, so it just applies the force and not the damage? I.e. MeleeWeapon:803.
 

Justin

Administrator
Staff member
That's likely correct. When the enemy hits the shield the RequireAim toggle is compared to determine if it should do any damage. If RequireAim is deselected then it will not do any damage.
 

AJ_Dubya

New member
That's likely correct. When the enemy hits the shield the RequireAim toggle is compared to determine if it should do any damage. If RequireAim is deselected then it will not do any damage.

Thanks for the replies! The issue is that the RequireAim toggle is selected yet still no damage is being received by the character even when not aiming. Is there something else I need to add to the weapon? Also, it only seems to affect the Player character, not AI characters with the same weapon.

Currently it has these components:
  • Transform
  • Item (script)
  • First Person Perspective Item (script)
  • Third Person Perspective Item (script)
  • Melee Weapon (script)
  • First Person Melee Weapon Properties (script)
  • Third Person Melee Weapon Properties (script)
  • Shield (script)
 
Last edited:
Top