Making simple animation for my mesh by changing the uv1

Godot Version

4.5

Question

im trying to make a really simple animatiion by just moving the texture alittle with time so i created a gdscript to do that the script is running with no errors but while there is no real changing inside of the game itself

extends Node3D

@onready var my_mesh_instance =$dashpad_1st
var material

func _ready() -> void:
	material = my_mesh_instance.get_active_material(0) 

func _process(delta: float) -> void:
	material.uv1_offset -= Vector3(0, 1, 0)


this is my code hope to get help
#note: im using an material overlay for the texture

The whole uv space is normalized to 0-1 range. Since textures endlessly repeat by default, decrementing by 1 does effectively nothing. Try a smaller number. You also need to multiply it by delta to ensure the offset is framerate independent.

1 Like