add color helper

This commit is contained in:
2025-02-24 19:39:57 +01:00
parent 6fecc5632c
commit 641b069cb0
3 changed files with 14 additions and 39 deletions

View File

@@ -0,0 +1,7 @@
extends Resource
class_name ColorHelper
static func get_direction_color(direction: Vector3) -> Color:
var angle = atan2(direction.z, direction.x)
var hue = (angle / (2.0 * PI)) + 0.5
return Color.from_hsv(hue, 1.0, 1.0)