I’m working on Morphing right now and I have a problem (See on the script).
My gameObject with the script has the exact same geometry than in right (CubeGeometry, same scale, same subdivision)
But, when I generate a total new geometry from scratch, the morphing works perfectly, no error.
If I take the geometry of my GameObject, and I do exactly the same thing, I got an error.
On the left the “Needle way” script, on the right the original script.
Yes for sure it wont change that - but then you can use the browsers debugging tools to see what is undefined / what the values are of your code at that point in time and try figure out what is wrong and why
You can do the same for your code - and you can add this command in your code in any line debugger to force the javascript debugger to break at runtime
I don’t really know why
But when I generate my Morph Target with the original script, the mesh.morphTargetInfluences is correctly “changed” (without any line of code)
But in the Needle way script it doesn’t