Vertex.y and vertex.z not working, only vertex.x in void vertex function

Godot Version

4.2.1

Question

Pretty much what I said in the title, when in gdshader vertex.x = some number works, but not vertex.y or vertex.z. When I try for example vertex.y = 1.0 nothing appears like it’s maybe very far away ? Any ideas ?

Hi,

From my point of view, it’s normal, if you only modify one and only one dimension of your VERTEX (whether it’s x, y, or z, but only one), you transform your mesh into a plane since you assigns the same value to all its vertices on a dimension.

If you combine the modification of a second dimension, you group your mesh’s vertices at a point in space (as a result, it is no longer visible in your 3D space).

If you test += rather than =, you will see that you can modify the 3 dimensions of your VERTEX and you will see it move in 3D space.

I see, I’m such an idiot I always forget that += exists … Useless topic then x)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.