hey folks I would like this thread to tackle the metal detector.

I’m implementing the angle penalty mechanics to follow the function depicted above.

X is an average from both X and Y facing angles… actually from world-to-screen coordinates.

The distance penalty is calculated linearly.

Should you have any other reasonable proposals just let me know and we shall vote these through.

Maximum penalty is 1 (reached for max angle of 4, if there is no distance penalty in place).

When penalty is 1 or above, there’s no sound from speakers.

The angle penalty function is thus defined as

you may draw it over here

**The above holds for when distance from player is < 10.**

otherwise, the function has ‘maximum’ value of 1 at 2.5 thus the cut-off moment happens earlier and the function is defined as

I think we wouldn’t want to make this more realistic and /or fluent to allow for relatively easy game-play when a gold-vein is very far away, thus there’s just a single ‘step’ accounting for the > 10 meters away difference.

As of now, the distance penalty is calculated as follows:

thus resulting in a linear relationship based in distance. The maximum distance penalty is thus reached when being 100 meters away from a gold vein.

The distance and angle penalties are added.

The volume is 1- totalPenalty.

oh and the angle penalty is now an average of Y and X facing angles.