Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to limit and be selective with line of sight?

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.

3 comments

0

try to do that with a fog script https://www.youtube.com/watch?v=7bQe1N4H8AQ

0

@killzebra312 thanks! I shall be trying it.

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. 

1 answer

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

2 comments

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?

0

A custom chunk loader could be used to only load parts within a X stud radius

This discussion is preserved as it was. New answers, comments, and votes are closed.