You should be able to do that by modifying its material’s diffuse color. If your mesh is not too complicated, you can create a new material override (in MeshInstance) and modify the diffuse color of this one only, so it won’t affect other instances of the same mesh.
This is what I have so far
var mesh = meshNode.get_mesh();
var mat = mesh.surface_get_material(0);
mat.diffuse = 0;
mesh.surface_set_material(0, mat);
But mat is returning null.
This is what I have for the editor.
Catprog | 2016-12-24 02:50
You can apply a material override in the inspector, or using the following code:
# Create a new FixedMaterial (for example)
var new_material = FixedMaterial.new()
# Assign it on the mesh as an override
mesh_instance.set_material_override(new_material)
# Modify the material (it will be applied on all meshes you use it on, here only one)
# Note: if you need a texture or other setup, you may want to set more params
new_material.set_parameter(Material.PARAM_DIFFUSE, Color(0,1,0))