Pryme8 Posted July 18, 2018 Share Posted July 18, 2018 So when I bake out the my objects transforms in this scene: https://www.babylonjs-playground.com/#NAG06Y#26 and try to do my raycast protection, none of the rays hit... which I find odd. here if I do not bake out the mesh that I am casting from some of the points hit, but they are not being cast from the correct positions, so I am confused. https://www.babylonjs-playground.com/#NAG06Y#27 its been a long day so maybe I am just missing something simple. trying to make it so I can move my plane or mesh that I am projecting the UV to like i did here: https://www.babylonjs-playground.com/#NAG06Y#8 Here is what happens when I bake the transforms prior to my sectionMesh function. https://www.babylonjs-playground.com/#NAG06Y#29 I am wondering if its the sectionMesh function that is giving me trouble. *EDIT* Nope its not: https://www.babylonjs-playground.com/#NAG06Y#30 Something is not getting baked it seems. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 18, 2018 Author Share Posted July 18, 2018 So I am thinking its not my ray casting that is messing this up, and is actually the sectionMesh method I am using. Is there a way to split up a mesh out into a new mesh from a range of points? In this example I am trying to grab out points 0-25 but it seems like even after I do that more buffer data then I anticipated is still present on the mesh. https://www.babylonjs-playground.com/#NAG06Y#34 So Im thinking my UV projection is not working because my bufferData is wrong. Any input would be cool. *EDIT* Never-mind I think i figured it out... after looking at it again this morning. (dumb loop count error) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 18, 2018 Author Share Posted July 18, 2018 Ok now this gives me a headache... https://www.babylonjs-playground.com/#NAG06Y#36 if you look at the console, all my rays are being cast for no reason as I stripped out all the vertices data from the buffer that I am looping through console.log(positions.length, "positions length"); for(var i=(skipTo*3); i<(positions.length-trim); i+=3){ } There is no reason 26 rays get cast. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 18, 2018 Share Posted July 18, 2018 Well positions.length-trim = 78 because trim is negative Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 18, 2018 Author Share Posted July 18, 2018 whoops... see thats what happens when you don't pay attention. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 18, 2018 Author Share Posted July 18, 2018 Well then riddle me this: https://www.babylonjs-playground.com/#NAG06Y#40 Why does this not simply "cut" out the section of the mesh that I want. Also whats up with the errors coming when you click on the scene, I have no mouse listeners bound but default stuff. Made a PR to get the Lathe object doing what I need: https://github.com/BabylonJS/Babylon.js/pull/4780 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 18, 2018 Share Posted July 18, 2018 I have no error (Just f5 your page, you may have an old event attached) Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 18, 2018 Author Share Posted July 18, 2018 https://www.babylonjs-playground.com/#NAG06Y#44 So I went ahead and used my custom lathe, now for some reason trying to apply the new UV is not working like it did with my initial scene with the star. I figured this should have been easy, guess I under thought it. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 18, 2018 Author Share Posted July 18, 2018 ohhh I bet I dont have the mesh as update-able... fml... *UPDATE* it was... RABBLE RABBLE RABBLE... its always the smallest things. https://www.babylonjs-playground.com/#NAG06Y#46 GameMonetize 1 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.