Godot Version
4.3
Question
i was just trying to make a simple script to make swaying lights easier for me, im just using the sine of time. im kinda stuck at actually rotating the light though, i dont really know what all the different rotation functions and values do either. my first thought was just “rotation.x = rotaton.x * sine” but that didn’t work. any help apreciated!
extends SpotLight3D
@export var rotation_axis: String
@export var amplitude := 1.0
@export var frequency := 1.0
var time: float
func _process(delta: float) -> void:
time += delta
var sine = sin(time * frequency) * amplitude
if rotation_axis == "x":
pass
elif rotation_axis == "y":
pass
elif rotation_axis == "z":
pass