You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the title, the Layer Mask variable of the WeaponManager class only excludes the "Player" layer. This is how it is initialized in WeaponManager.
Copying the layer mask to a public variable to view in the Inspector:
This results in objects on the "Ignore Raycast" layer (like corpses and lootpiles) to "block" the attack spherecast. The corpses aren't considered doors or static colliders, so the backup raycast never fires. This makes hitting enemies while fighting around corpses unreliable as you get no feedback on whether the attack just missed or it hit a corpse and vanished. Especially noticeable with small enemies like rats, but can also be problematic with the camera level due to the size of the spherecast.
Theoretically, this can also mean that the automap marker models can block attacks, though I have not tried this yet.
SOLUTION:
Simply removing "Ignore Raycast" (and maybe "Automap" as well) from the included layers in the Layer Mask would fix this behavior.