You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking when player in an area of a light, and that light area is in the enemy view cone, send a ray through player randomly each frame, then a ray from impact to enemy to see if there's no obstruction.
some related thoughts from Stewie:
we could compute the light on the cpu, As an approximation of the actual shader
but still, with no shadow data, it's not that good of a deal
And also, we are kind of running on one of the limits of godot here
which is the lack of query APIs on the internal servers
for example, here's all the instance related functions under RenderingServer on godot 4
An instance is basically anything that gets drawn
if you create one yourself, you get an RID, which gives you full control over it, and that's how the node system interacts with the rendering server internally
but there's no way to simply go to the rendering server and get a list of all instances RIDs
and here are the lightmap functions, again no way to get all lightmaps, or to even get a texture out of a lightmap, only set
I doubt it, most people don't want to go into the guts of the internal servers
It might not be that hard of an issue tho, just exposing stuff, so maybe they would do it with some interest
or maybe it's way too hard to do, can't be sure
SILHOUETTEING
a few rays from viewer to player's extremities and behind to bright light should lead to detection.
this could be done on the same raycast check to the player in direct_player_sight. If connects with player but player's light_level is too low for detection, cast a few more points through player, maybe one a frame, cycling between 4 to 8 points at edges of player's collision to see if hit, if hit, send another through player at same angle and see if surface behind is lit, then player silhouette detected.
The text was updated successfully, but these errors were encountered:
SHADOWS
I was thinking when player in an area of a light, and that light area is in the enemy view cone, send a ray through player randomly each frame, then a ray from impact to enemy to see if there's no obstruction.
some related thoughts from Stewie:
we could compute the light on the cpu, As an approximation of the actual shader
but still, with no shadow data, it's not that good of a deal
And also, we are kind of running on one of the limits of godot here
which is the lack of query APIs on the internal servers
for example, here's all the instance related functions under RenderingServer on godot 4
An instance is basically anything that gets drawn
if you create one yourself, you get an RID, which gives you full control over it, and that's how the node system interacts with the rendering server internally
but there's no way to simply go to the rendering server and get a list of all instances RIDs
and here are the lightmap functions, again no way to get all lightmaps, or to even get a texture out of a lightmap, only set
I doubt it, most people don't want to go into the guts of the internal servers
It might not be that hard of an issue tho, just exposing stuff, so maybe they would do it with some interest
or maybe it's way too hard to do, can't be sure
SILHOUETTEING
a few rays from viewer to player's extremities and behind to bright light should lead to detection.
this could be done on the same raycast check to the player in direct_player_sight. If connects with player but player's light_level is too low for detection, cast a few more points through player, maybe one a frame, cycling between 4 to 8 points at edges of player's collision to see if hit, if hit, send another through player at same angle and see if surface behind is lit, then player silhouette detected.
The text was updated successfully, but these errors were encountered: