[Bug] Humanoid characters behind cover damaged by explosion with Line of sight enabled

Cheo

Active member
Hello, here is a video showing some issues with the Line of sight bool on the Explosion script :


As you can see, a simple object like a crate can be protected from an explosion's blast by a simple wall, while a humanoid character will take damage despite having the same cover. I didn't mention this in the video but we should have some obstacle layer mask for the line of sight check, unless I missed something. Thanks in advance.
 
The line of sight check works by casting a ray between pivot locations. Since the pivot location for the character is at the floor the raycast is likely going underneath the wall. You can use the Pivot Offset component to readjust the pivot location.
 
Hi, here's another video showing that it is not a matter of pivot. Once again, the line of sight check looks for humanoid stuff, I don't think that's a coincidence, please have another look at it.

 
Within Explosion.cs you can fix this by changing the following on line 188:

Code:
                                m_RaycastHit.transform.IsChildOf(m_Transform)
to:
Code:
                                !m_RaycastHit.transform.IsChildOf(m_Transform)

You were right in that it was related to the humanoid check.
 
Top