Hide Part of a Mesh

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 1Snakel
:warning: Old Version Published before Godot 3 was released.

How can make a part of a mesh invisible. I need to make a animated char invisible on a range on the Y axis. Can some one help me? Shader? Why isn’t there a logic comparator on the Shader Graph?

If you need to animate the range, I would say shader material, by outputting zero alpha or using pixel discarding. However I have no knowledge to practice that in Godot yet :confused:
Maybe with alpha you could map the world Y value to a curve that has a sharp cut along the range you want to make invisible, but it would be hard to animate.
Otherwise, using step() would do the trick on alpha without the need for conditionals, however I don’t see a node graph equivalent :confused:

Zylann | 2016-09-29 00:04

Well thanks for you comment, I’ve got a problem, on the fragment shader, when a get the vertex position, it makes the vertices go crazy, like it doesn’t project them correctly. It stays blank on the screen

1Snakel | 2016-09-29 00:25