Proximity detection angle settings

Currently what proximity detects are target objects 360 degrees around it, it would be interesting if you could have settings to change this angle to something like 90 or 180 degrees, and the direction it detects can be decided with an input similar how the rotation module works. With this you could easily make things like flashlights, field of view detectors, stealth games requiring you to remain out of sight, etc

You could have 7 raycasts each with equations for angle, based on rotation,

Like rotation -45 -30 -15 0 +15 +30 +45 if you want to cover a whole 90 corner of rotation.

If you are using 7 raycasts, applying changes to their casting angles based on the player’s orientation would require 7 times as much effort as a single angle-based proximity detection. Raycast also does not penetrate/ignore other objects like proximity does, cannot detect behind other objects. And between each of those 7 raycasts smaller objects could be hidden as the distance grows greater, because they are lines, so to detect at further and further distances you would require more and more raycasts at smaller intervals, but there is a limit of 360 raycasts and 1 degree intervals.

If raycast had settings for casting a cone-shaped dectection area instead of a single line, and it could penetrate/ignore other objects, raycast would be even better because proximity has no on input like raycast does giving you more control. This or my first suggestion would be cool.

Raycast width would be nice, since I’ve used raycast for jumping, and if I step over a ledge, or between a gap, I can no longer jump.

Do proximity check.
When you get a hit on something relevant, PointAt that object.
If the PointAt angle is between (whatever line of sight cone you want, for example +270/-90 would put a cone facing to the right.
Then react.
Otherwise ignore.

Not sure though if this would lead to huge loops possibly lagging something? Probably need a 10/s timer somewhere in there?


@Kollamma , this post is from 2018.
Old posts could have old users, games or issues that isn’t in flowlab anymore.
Also commenting on old posts brings them back to the top of the forum and pushes newer discussions down. It’s to keep an eye on the date of discussions and not to “grave dig”. If the topic is about a similar issue you are having, then please create a new discussion. Flowlab gets updated all the time, so its likely that the issue is being caused by a different way.