Shield Damage Not Absorbed During Sword Attack

1. UCC 2.0.1
2. Unity 2018.2.5f1
3. I tried to create the same effect with a 1H sword that you see on Boxing Joe Recoil in the demos scene, where the shield causes the sword to recoil and no damage is applied to the character. However, when I created an enemy character with shield in his hand, even though it stops the arrows, when I hit him with the sword, he suffers damage. The recoil, metal sound, etc, all are applied, but character suffers damage. I made sure that the shield absorption factor is 1 and the strength is at 100.
4. In order to reproduce, create an enemy character using UCC, add shield, and attack using sword.
5.
IndexOutOfRangeException: Array index is out of range.
Opsive.UltimateCharacterController.Editor.Inspectors.Traits.HealthInspector.<GetDrawCallback>m__0 () (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Traits/HealthInspector.cs:94)
Opsive.UltimateCharacterController.Editor.Inspectors.StateSystem.StateBehaviorInspector.OnInspectorGUI () (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/StateSystem/StateBehaviorInspector.cs:97)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1374)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

1538265598824.png
 
When your shield has the ShieldCollider it does not need the RecoilObject - that is only necessary because the demo shield doesn't have the ShieldCollider component.

Try changing line 91 of HealthInspector to:

Code:
if (Application.isPlaying && !string.IsNullOrEmpty(m_Health.ShieldAttributeName) && selectedShieldNameIndex - 1 < m_AttributeManager.Attributes.Length) {
 
Yes, I added the RecoilObject after I failed to make the shield work against the sword, seeing that the Jack's shield had that property, so I wanted to try my luck. will add that code and let you know. Thank you.
 
I have added the code and the enemy character still receives damage when I hit on the shield. I make sure that the shield collider is huge, and the sword is barely touching the shield, so it positively does not touch any of the player collider. The shield starts with "subcharacter" layer, does that have anything to do with it? I noticed the Jack with the shield had a shield with default layer, but when I used default on the enemy's shield, it causes the internal colliders to push the character.
 
I have checked the impact layers, and sub-character layer is listed in there. Are you able to replicate any enemy character in demo scene that does not receive melee damage when shield is up?

The character currently does not aim or use the shield. Is it necessary for it to get activated? I imagined it seems to be working in the idle state, as it does stop arrows at this time, but not melee.
 
Curious if this worked for you, I am having the same issue where both my attacks and the ai attacks penetrate the shield.

Also curious why reinstalling the movement pack would fix this issue? I installed the integration after installing the movement pack.
 
Ok, I tes
Curious if this worked for you, I am having the same issue where both my attacks and the ai attacks penetrate the shield.

Also curious why reinstalling the movement pack would fix this issue? I installed the integration after installing the movement pack.

Hey. I just realized I posted my reply for a Behavior Designer thread over here by accident. I have moved it now.

I am still having the same issue with the shield. It does absorb damage for arrows, but not for melee at this time. I believe Justin said he added it to his list (and then I asked so many questions, I am not sure if it was regarding this :D)
 
Top