Godot Version
4.2.1
Question
I have this coloured sprite to which I want to change a hue.
In modulate property when I drag the hue slider the hue doesn’t change unless I’ve decreased a value on one of the RGB sliders.
Instead I want a behaviour like in photoshop which is shown in this video.
Why I need to tweak the hue.
I have a geometry dash game where the player (has the same sprite) leaves the trail of these sprites. The trail disappears with time and must change hue. It also should start with the same hue, but with time it should change the hue.
this code is responsible for trail:
extends Node2D
var trace = preload("res://trace_sprite.tscn")
var MyDelta
func _process(delta):
MyDelta = delta
func _on_trace_sprite_timer_timeout():
var trace_sprite_instance = trace.instantiate()
$traces.add_child(trace_sprite_instance)
trace_sprite_instance.position = $player_1.position
trace_sprite_instance.rotation = $player_1.rotation
while trace_sprite_instance.modulate.a > 0:
trace_sprite_instance.modulate.a -= 0.03 * 45 * MyDelta
trace_sprite_instance.modulate.h -= 0.01 * 45 * MyDelta
print(trace_sprite_instance.modulate.h)
await get_tree().create_timer(0.0005).timeout
if trace_sprite_instance.modulate.a <=0:
trace_sprite_instance.queue_free()