This commit is contained in:
ackimixs
2024-05-22 13:16:11 +02:00
parent b7a45f28c4
commit 63c384e723

View File

@@ -45,7 +45,7 @@ void GameControllerHandler::handleMessage(const std::string &message) {
if (distance <= 100) {
strength = 0xFFFF;
} else if (distance <= 500) {
} else if (distance <= 300) {
double factor = 1 - Modelec::mapValue(distance, 100.0, this->lidarDectectionDistance, 0.0, 1.0);
strength = static_cast<Uint16>(factor * 0xFFFF);
} else {