Hello all, I just started learning Godot. and I have a simple question, in the editor, I created a platform, which has no texture. My question is how can I add a texture to my platform?
Adding texture
dorpen that's a physics body.
you need a visual, which can be a sprite3D but is usually a MeshInstance3D.
create a mesh in blender, uv wrap it, export it to gltf, import it in godot, open as inherited scene, and copy paste in your scene.
for prototyping you can use one of godot's built in meshes, like cube, but make sure to remove them all eventually and replace them with custom meshes, since they can lead to performance issues and visual glitches, as they are not meant to be used in a finished game.
think of meshinstance3D and sprites, and physics bodies as existing in different dimensions. when you parent a visual node to a physics body, it will be moved by it.
In this case your visual doesn't need to be a child of the physics body because StaticBody3D
should NEVER move, so you can put these as children of a different Node3D
. In your staticbody3D you can add more colliders for each wall or floor and it will have better performance than having multiple staticbodies, while making your life easier. I usually have one StaticBody3D for the floors and one for the walls, that way you can set different collision layers, this can help prevent your character from walking on walls or for implementing stairs.
- Edited
dorpen I just started learning Godot
Materials is one area in which 3D is much more complex than 2D in Godot. You may want to start with 2D until you're more familiar with Godot.
If you want to stick with 3D, there's an overview here:
https://docs.godotengine.org/en/4.2/tutorials/3d/standard_material_3d.html#standard-material-3d-and-orm-material-3d
Hi there, I switched the tags as this is more asking for help than a project.
Thanks all for the support and help. Greatly appricated!