add color helper
This commit is contained in:
7
scripts/helper/color_helper.gd
Normal file
7
scripts/helper/color_helper.gd
Normal 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)
|
||||
Reference in New Issue
Block a user