Boat/Ocean/oceanTile.gd
2025-03-24 16:01:39 +01:00

16 lines
422 B
GDScript

extends MeshInstance3D
class_name OceanTile
var time:float
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
time += delta
var mat : ShaderMaterial = mesh.surface_get_material(0)
mat.set_shader_parameter("wave_time",time)
pass