when the right object selected , i do not want it covered by others, set material.transparent = true; material.depthTest = false; can make it always on top of others.
Even if you set depthTest to true that doesn’t mean it will render last. It looks like you have another transparent object that’s rendering which uses depthTest = false that renders after your box. You can guarantee that your box renders last by using mesh.renderOrder = 1 (or some higher number than what’s being used elsewhere in the scene)