Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to limit and be selective with line of sight?

Asked by
Ribasu 127
5 years ago
Edited 5 years ago

Let's say I am a player walking in the game world I have created.I want to be able to see everything that is X units away from me and not more (if I want to see these things further away, I have to walk in that direction so that I am close to them).

How do I limit this kind of line of sight? I understand this can cause some complications; maybe it doesn't make sense to have this limitation on brick/terrain in the distance, but it makes sense for some other items so maybe there is a way to select what.

0
try to do that with a fog script https://www.youtube.com/watch?v=7bQe1N4H8AQ killzebra312 -7 — 5y
0
@killzebra312 thanks! I shall be trying it. Ribasu 127 — 5y
0
You could also use StreamingEnabled which is another way of loading the parts that are in the player's line of sight and not loading when not in the sight. A Word of warning however, it is very buggy. i.e, it is not stable.  Zafirua 1348 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

You could use fog, set the FogStart property in Lighting to how many studs away from the camera the fog starts, and you can set FogEnd to set a gradient to the fog being invisible to it being completely opaque.

Or you can make a custom chunk loader, which I don't know how to do so I can't really help you there

0
Thank you for your reply! I will be sure to try your suggestion once I get some time; I haven't considered FogStart. Could you provide some more details on a custom chunk loader like what it is and what's its purpose? Ribasu 127 — 5y
0
A custom chunk loader could be used to only load parts within a X stud radius User#1007 6 — 5y
Ad

Answer this question