0 votes

I keep finding stuff for ShaderMaterial, but it seems like the same calls don't apply. I think?

I just want to change the UV offset in code. But I don't know how to call it in script

This is what I attempted from what I found about shader material's, but I think it's different for spatial materials:

$Floor.material(0).set_shader_param("uv1_offset",midpoint)

Please help.

Thank you.

in Engine by (293 points)

1 Answer

0 votes
Best answer

I figured it out.

You call it with "node".get_surface_material(0) first.

I used it as a variable. Then attached the parameters I needed to change, I.E;

mat.uv_offset
by (293 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.