Hello,
1, The BoxCollider of pickup shield will be disable when shield be pickup and equipped. This causes the shield unable to block the projectiles. Please check it. Because UCC demo uses different way, no instantiation process, I am not sure. But, this problem also exists in UIS integration demo.
2, Even enable the boxcollider,the shield also cannot block hitscan, but can block projectiles. The code marked in blue below is from ShootableWeapon.HitscanFire(float strength), and I added three debugs. The test result is that hitGameObject is never shield, Although I'm sure the hitscan went through the shield, and the bullet hit shield surface system has taken effect.
// The shield can absorb some (or none) of the damage from the hitscan.
var damageAmount = m_DamageAmount;
#if ULTIMATE_CHARACTER_CONTROLLER_MELEE
ShieldCollider shieldCollider;
Debug.Log(33);
Debug.Log(hitGameObject);
if ((shieldCollider = hitGameObject.GetCachedComponent<ShieldCollider>()) != null) {
Debug.Log(44);
damageAmount = shieldCollider.Shield.Damage(this, damageAmount);
}
#endif
1, The BoxCollider of pickup shield will be disable when shield be pickup and equipped. This causes the shield unable to block the projectiles. Please check it. Because UCC demo uses different way, no instantiation process, I am not sure. But, this problem also exists in UIS integration demo.
2, Even enable the boxcollider,the shield also cannot block hitscan, but can block projectiles. The code marked in blue below is from ShootableWeapon.HitscanFire(float strength), and I added three debugs. The test result is that hitGameObject is never shield, Although I'm sure the hitscan went through the shield, and the bullet hit shield surface system has taken effect.
// The shield can absorb some (or none) of the damage from the hitscan.
var damageAmount = m_DamageAmount;
#if ULTIMATE_CHARACTER_CONTROLLER_MELEE
ShieldCollider shieldCollider;
Debug.Log(33);
Debug.Log(hitGameObject);
if ((shieldCollider = hitGameObject.GetCachedComponent<ShieldCollider>()) != null) {
Debug.Log(44);
damageAmount = shieldCollider.Shield.Damage(this, damageAmount);
}
#endif