How to rotate GUI node with animation

I just want to smooth rotate for the circle node SplashLoading of the my loading screen


I asked GPTChat then edit his code:

local function animate_rotate_clockwise(node)
	local degrees = 180  -- количество градусов поворота
	local duration = 1.0  -- длительность анимации в секундах
	local end_rotation = math.rad(degrees)  -- конечный угол поворота
	gui.animate(node, "rotation", vmath.quat_rotation_z(end_rotation), gui.EASING_LINEAR, duration, 0, nil, gui.PLAYBACK_LOOP_FORWARD)

But I have bouncy half-rotation (I need full rotation…)

Sorry for the live video from camera…

I think this because the target property value is quaternion… idk… I’ve tried different variants for parameter of to to solve it.

Use “euler.z” with value 360 instead of “rotation”


THANKS! VERY much!!! :kissing_heart:

for newbies like me, I posted here the code for rotation node,
get it:

local function animate_rotate_clockwise(node)
	gui.animate(node, "euler.z", -360, gui.EASING_LINEAR, 1.0, 0, nil, gui.PLAYBACK_LOOP_FORWARD)
1 Like