I have a camera parented to a Node3D that is rotating. The camera is rotating around an animated character for a presentation ‘turnaround’ demo.
The character animation is a 6 second loop.
I want the camera rotation to do one full rotation in 6, 12, 18, or 24 (etc) seconds so that a screencapture video can be made to loop.
Does that make sense?
(Thanks)
Here is my current code -
extends Node3D
@export var camera_rotation = 0.002
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
rotate_y(camera_rotation)
Here is a web page of my project with a video screencapture on it
delta is the time between frames, so if you multiply your value by delta it becomes “per second” Otherwise it’s “per frame” which isn’t a useful measure of time.
This sample would travel at 14m/s because it is 14 * delta.
A full rotation in radians is TAU so if you want a full rotation over the course of a second you would use TAU * delta. If you want a full rotation over the course of 6 seconds you need to divide by 6, TAU * delta / 6