simon_bg Posted February 26, 2016 Share Posted February 26, 2016 Hi guys! I have a tube mesh, created with an array of Vector3 points. I update this tube mesh adding new points to the path, but for some reason it's giving me errors like Uncaught TypeError: Cannot set property '0' of null Uncaught TypeError: Cannot set property 'x' of undefinedhttp://babylonjs-playground.com/#85J9N#10 What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
jerome Posted February 26, 2016 Share Posted February 26, 2016 http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#tube You just can't add or remove points from the path when updating, you can only move the existing points : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#what-is-morphing Quote Link to comment Share on other sites More sharing options...
simon_bg Posted February 26, 2016 Author Share Posted February 26, 2016 Thanks jerome! From this documentation http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#tube I kinda assumed it could be done. I think the reminder " only points positions can change in the path, not the number of points. " is missing here, otherwise it can be confusing. Cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.