Good afternoon, I wanted to know if it is possible to make sure that damage is dealt to a character when he is in an area without light, but in an area with light he does not receive damage or is healed?
The easiest way could be setting some “safe zone” volumes were the lights are, but i don’t know if you can revert the Pain volume to doesn’t deal damage or even heal aswell, or you can set a pain volume all over the map, and some trigger zone who gain an equal heal amount then the damage dealt nullifing it.
Automatic light volume approximation through a raycast and cone angle calculation to get a rough area where the spotlight hits + point lights based on radius.
Not ideal as it will not catch smaller shadows but it’s an estimate.
Another way of achieving the same thing would be to make an actor, add a box or capsule collider to it then check it for overlap with the player and deal damage. You’d have to place the actor wherever the light is casting. Works well if there are not a lot of lights.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.