Closed killfrenzy96 closed 1 week ago
The issue is found within the public void HitShovel(bool cancel = false)
function inside the Shovel
object.
Within this function, there is this decompiled line:
objectsHitByShovel = Physics.SphereCastAll(previousPlayerHeldBy.gameplayCamera.transform.position + previousPlayerHeldBy.gameplayCamera.transform.right * -0.35f, 0.8f, previousPlayerHeldBy.gameplayCamera.transform.forward, 1.5f, shovelMask, QueryTriggerInteraction.Collide);
The shovel max distance is hard coded to 1.5 units. However, I think this may be worked around by patching code just before and after this function is run to reset the gameplayCamera.transform.position
value.
The shovel (or any other melee attack) does not work correctly in third person. I feel like the melee ray cast may be originating from the camera position, which is often out of range of the enemy.