|Topic was automatically imported from the old Question2Answer platform.
Alright, so I’m trying to make an object that you can pick up and carry and becomes partially transparent when carried (think OG Deus Ex)
I’ve got a shader material in slot 0 with a float defined that sets alpha to it, and I’m passing through a value with
mat = $MeshInstance.get_surface_material(0)
_al is the alpha value set earlier in code.
But when I run, I get a weird duplication thing happening
I’m assuming I’m setting the materials wrong, but I don’t really get what I’m doing here, this is my first foray into 3d dev.
The displacement is because the one at the bottom is falling according to code, whereas the top one is stuck at origin and doesn’t seem to be affected by the attached script. Collision only applies to the bottom one, but only the top one renders shadows. The alpha that gets defined only applies to the bottom one (the top one seems fixed at full opacity). There’s also a strange issue on the bottom one where certain faces will render over others (visible in image on bottom one)
There is only one mesh instance in the scene.