Zap traps not damaging player
Posted: Wed Mar 11, 2020 11:03 pm
Dungeons can cast spells at the player, like some mausoleum entrances.
While a flash can be seen and a zap can be heard (the shock missile is harder to see, but it can be observed in the editor), I don't remember having my health damaged by one such trap.
I'm not entirely sure why; I suspect that sometimes the player capsule is not on the trajectory of the missile, or already collides with the spawned missile, but even when the colliders are correctly aligned, they get thru one another. I suspect the issue is that such "environmental" missiles use the player as the caster, so the player is excluded from collisions, but I've yet to verify this hypothesis (what caster can be used?)
PS I just proved the hypothesis by removing the two lines that exclude collisions with the player if (s)he is the caster. Still don't know what caster to use however.
While a flash can be seen and a zap can be heard (the shock missile is harder to see, but it can be observed in the editor), I don't remember having my health damaged by one such trap.
I'm not entirely sure why; I suspect that sometimes the player capsule is not on the trajectory of the missile, or already collides with the spawned missile, but even when the colliders are correctly aligned, they get thru one another. I suspect the issue is that such "environmental" missiles use the player as the caster, so the player is excluded from collisions, but I've yet to verify this hypothesis (what caster can be used?)
PS I just proved the hypothesis by removing the two lines that exclude collisions with the player if (s)he is the caster. Still don't know what caster to use however.