fuzzyworld

godot-shooter / commit

Change the radar "ratio" (which is used for alpha of the radar particle) to be in the range 0.4-1.0

2b49fa02fc14b9449befaacb367e7e4bdfe881f8 · Pavel Safronov · 2023-12-05 10:37:52 -0800 · parents 56cadf84048a

Change the radar "ratio" (which is used for alpha of the radar particle) to be in the range 0.4-1.0
 actors/Player.gd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/actors/Player.gd b/actors/Player.gd
index 73ceef2..524c5a5 100644
--- a/actors/Player.gd
+++ b/actors/Player.gd
@@ -157,7 +157,7 @@ func update_radar(items: Array, color: Color):
 		var item: Node = i
 		var diff = item.global_position - global_position
 		var dist = diff.length()
-		var ratio = Utils.dist_to_ratio(dist, radar_min_radius, radar_max_radius) * .8 + .2
+		var ratio = Utils.dist_to_ratio(dist, radar_min_radius, radar_max_radius) * .6 + .4
 		if dist < radar_min_radius:
 			ratio = 0
 		var angle_to = Vector2.UP.angle_to(diff)