Decal on mesh predefined position

Hi all,

it might be simple but I am stuck, question is:

How to put decal on mesh predefined position?


Hello :slight_smile:

What do you mean exactly by “predefined” position ?

For example, in this demo from the docs the decal is places using the scene mouse picking :

BABYLON.MeshBuilder.CreateDecal("decal", cat, {position: pickInfo.pickedPoint, normal: pickInfo.getNormal(true), size: decalSize});

So, assuming you already know the position and the normal (2 BABYLON.Vector3) you can place decal without mouse picking. Is it what you mean ?


For example, I have T-shirt and want to put decal on chest left side, how to obtain position and normal for that position, without picking it at runtime?

I can pick it during development phase and save position and normal for future use, but do not know how to obtain it at first?

As I am typing, it becomes clear that I can pick it during “development phase” and save position and normal, is it ok aproach?

Another predefined position question: how to put decal on mesh center, can I somehow programmatically obtain mesh center position and normal without actually picking it?