Search code examples
3dgame-engineblendergodot

Why can't I replace my mesh from MeshInstance node in Godot?


I made a first person shooter game in godot and currently I have a bad looking weapon for my character. I made a new pistol in blender, I exported it as a .glb file and I tried to replace the gun from the MeshInstance Node but I gave me an error: "The selected resource (PackedScene) does not match any type expected for this property (Mesh)." Any solutions please?


Solution

  • The error is telling you that you are trying to assign a Scene to a Mesh. Those aren't the same kind of thing. Scenes have nodes, some of which are MeshInstances, some are other things (lights, colliders, etc...).

    You have two options:

    1. Replace the MeshIntance (which is a node) with the new Scene. I repeat, the MeshInstance, not the Mesh attribute of the MeshInstance, replace it with the new Scene.
    2. Extract the Mesh from the Scene. Your new Scene must have a MeshInstance that has the Mesh you want. Save it as new file. Then set that mesh to the MeshInstance you have.