HighlightLayer not working for AbstractMesh

const highlightLayer = new HighlightLayer(

        "hl",

        EngineEx.CurrentScene.scene

    );

    highlightLayer.innerGlow = false;

    highlightLayer.addMesh(abstractMesh as Mesh, Color3.White());

Hello There!

Im trying to make an abstract mesh have an outer glow, however for some reason the above code is not working and there is not glow at all around the mesh.

Does anyone have any ideas on why this could be? or maybe if there is another way to at a outer glow? (ive tried a glow layer aswell)

Welcome aboard!

The highlight layer takes a Mesh in parameter, not an AbstractMesh: casting an abstrach mesh to mesh will do no good (only the other way around is ok).

An abstract mesh has no geometry so can’t be rendered.

You should provide a repro in the Playground (https://playground.babylonjs.com/), maybe we will be able to help more.

As mentioned here, you need to use getRenderingMesh for an AbstractMesh

hl.addMesh(someVariableWhichContainsImportedMeshOfTypeAbstractMesh.subMeshes[0].getRenderingMesh(), BABYLON.Color3.Green());