The decal works fine on the cat mesh but when I import a different mesh it doesn’t show.
Is there something I need to set on the mesh for decals to work?
Thanks,
Josh
The decal works fine on the cat mesh but when I import a different mesh it doesn’t show.
Is there something I need to set on the mesh for decals to work?
Thanks,
Josh
You need to remove the function (mesh) { return mesh === cat; }
predicate when calling the pick function.
Also, your meshes don’t have normals, so pickInfo.getNormal(true)
won’t work as expected. You can make the system compute the normals by calling createNormals
for all meshes:
It does not work very well because the meshes are very irregular / with holes, because of the technique used to generate them.
Great thanks that worked
Do you know how can make a plane rotate so it’s perpendicular to normal?
Do you mean you want to rotate a plane around its normal?
Yes that’s what I mean.
You can use the rotateAround
method: