Page MenuHomeFeedback Tracker

Feature/scripting request: Player(object) shadring/darkness
New, NormalPublic

Description

What?
As far as I've looked there is no visiblity evaluation based on light or shadows or anything in that regard.
There is no way to check if a flashlight is pointing at the player, or even if the sun is shining on a player, I couldn't even find a way to find where the sun is.
I can kind of use raycast to find if a player is in front of a flashlight myself, but I can't find if the player can see the sun.

Why?
There's plenty of things I could utilize this for, from reducing zombie visiblity in dark areas to adding a glint to a weapon scope whenever there's a light(or sun) shining onto it.

How?
Golden scenario:
A way to check how well lit is the player (or any object to that matter)
Silver scenario:
Check if player is in shadow/light or not
bronze:
Get Sun position command/function

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Scripting

Event Timeline

nigel created this task.Sep 24 2019, 11:42 PM
nigel updated the task description. (Show Details)

Explanation on scope glint:
It's not a flashlight, it is a scope glint
https://i.imgur.com/KeuGSlH.png