Files
Shrender-Man/camera.gd
2026-03-02 02:17:04 +00:00

14 lines
550 B
GDScript
Executable File

extends Node3D
var randomX = 0.9095803175867071
var randomY = 0.39601384570649956
var CamRandomX = 0.5878399776360081
var CamRandomY = 0.14235441794595538
func _process(_delta):
$UpDown/torch.rotation_degrees.y = sin((float(Time.get_ticks_msec())/1000)*(randomX))*5
$UpDown/torch.rotation_degrees.x = sin((float(Time.get_ticks_msec())/1000)*(randomY))*5
$UpDown/Camera3D.rotation_degrees.y = sin((float(Time.get_ticks_msec())/1000)*(CamRandomX*2))
$UpDown/Camera3D.rotation_degrees.x = sin((float(Time.get_ticks_msec())/1000)*(CamRandomY*2))