How can I set a shape's texture?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By C:\Flavius

I have used some game engines since now, and this is the first time I use godot for a 3D project, so I don’t know the exact words.
I have created a physics body and set a collision shape, gave it the shape of a 10x1x10 prism.
What I want now is to give it a plain white/gray texture and be able to walk over it, but I can’t seem to find any way of giving it a texture.
I have searched the internet for a solution but I haven’t found one so I’m pretty sure I am just not using the correct words for this engine, you know, each one uses slightly different words.
I just wanna walk over a plain gray floor with the blue sky over my head. I already have the “blue sky”, or at least something that looks good enough for now.
Thank you in advance

:bust_in_silhouette: Reply From: Zylann

A body and a collision shape have nothing visual, their purpose is only what they say: physics and collision.

If you want your object to be visible, you need to also add a MeshInstance to it (or any node that derives VisualInstance), and assign a mesh to have it rendered by the graphics card. In your case, you can probably assign a new PrismMesh in the mesh property of the MeshInstance.