change the UpdateGlobalThrust thrust nomalization to actually have a contiguous range of values
This commit is contained in:
3
main.lua
3
main.lua
@@ -937,7 +937,8 @@ function UpdateGlobalThrust()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Normalize the desired thrust to be between 0 and 1
|
-- Normalize the desired thrust to be between 0 and 1
|
||||||
local normalizedThrust = math.max(0, math.min(1, (desiredThrust + 1) / 2)) -- Convert from [-1, 1] to [0, 1]
|
local normalizedThrust = CustomSigmoid(desiredThrust)
|
||||||
|
if normalizedThrust < 0 then normalizedThrust = 0 end
|
||||||
|
|
||||||
if Config.Debug then print("DEBUG: "..thruster.name..": desiredThrust "..desiredThrust..", normalizedThrust "..normalizedThrust) end
|
if Config.Debug then print("DEBUG: "..thruster.name..": desiredThrust "..desiredThrust..", normalizedThrust "..normalizedThrust) end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user