Hello,
In one of my scenes with many mesh colliders, under certain angles, I can't hit a target (a character) that's in front of me. Instead, the hit gameobject is some environment asset behind with a mesh collider (I know it with Debug.Log(hitGameObject) added line 965 in ShootableWeapon script).
This is not happening every time but when it does, I immediately disable most of the environment assets and after that, I can hit again the target that's right in front of me from the very same angle.
It's like the hitscan is somehow confused when there is too many mesh colliders in line of sight.
But I don't understand why the first object in line of sight isn't always the one that will be hit.
Anyone saw something similar?
In one of my scenes with many mesh colliders, under certain angles, I can't hit a target (a character) that's in front of me. Instead, the hit gameobject is some environment asset behind with a mesh collider (I know it with Debug.Log(hitGameObject) added line 965 in ShootableWeapon script).
This is not happening every time but when it does, I immediately disable most of the environment assets and after that, I can hit again the target that's right in front of me from the very same angle.
It's like the hitscan is somehow confused when there is too many mesh colliders in line of sight.
But I don't understand why the first object in line of sight isn't always the one that will be hit.
Anyone saw something similar?