How to make a meshInstance3D visible when I play scene?

Godot 4.2

I’m Struggling with something simple; how to make a meshInstance3D visible when I click play?

Could you provide some more detail of what you’re trying to do?

If you have a MeshInstance3D that you are hiding in the editor, but you want it to show when you start the scene you could add this code to it:

extends MeshInstance3D

# Called when the node enters the scene tree for the first time.
func _ready():
	show()

Thanks for answering. I open the terrain 3D project and want to put a water shader in it. But the water doesn’t show when played scene. I checked with a normal box (meshInstance3D, mesh box) and it wasn’t visible ither. I revised the visible option and is “on”. I enlarge it and it simply doesn’t show. Don’t know if it is the project or that the mesh is not readed because something obstacle the visibility; something invisible… well, sorry and hope you can answer. :pray:

Note: the project is the demo of terrain 3D made by @TokisanGames

That sounds like it might be an issue with your Material/Shader and not with the Mesh itself.

Does the Shader you’re using work and display correctly in the Editor?
If yes, maybe the shader gets culled in your Camera3D somehow?
Could you link/post the water shader?

Shader link:

It’s not only the shader, the box doesn’t appear too.

1 Like

Problem solved. The project that opened was a “copy”??? and the scene that played was one named Demo. Seems like the scene doesn’t need to be displayed to be played. And that was making all the confusion. thanks a lot for your time!! I really appreciated :smile: :slightly_smiling_face: :pray:.

1 Like

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