Hi guys, I am reading this doc, and tried to change the mesh from a built-in tube to a more random one (a cat I found).
However, after I import the cat mesh, the random generated points of the cat are not on the original surface of the cat. It is below it. see my PG, cat in red.
========== My Questions ==========
(1) I am pretty sure the createSurfacePoints function does its job and should generate points directly onto the surface of the original mesh, but why it does not work for the cat case? and how can I fix this (I tried to change position, scaling, etc, but I don’t think they work generically)?
my thought: maybe due to local vs world coordinate?
(2) If I remove the meshName [“Shcroendiger’scat”] on line 105 of my code, then I get two errors:
TypeError: Cannot set properties of undefined (setting '_isDirty')
. &&
TypeError: Cannot read properties of undefined (reading '_isDirty')
I am not sure why, as an empty string inside of the ImportMesh function should import all meshes.
and how can I fix this error?
my thought: I think it is because the other two meshes in the file (three meshes in total, not the cat mesh) have some deficiencies so that I cannot apply the drawPoints function on them?
========== Side Note ==========
(1) I also tried to import this skull, but it doesn’t have any issues.