JonVarner Posted August 23, 2018 Share Posted August 23, 2018 I seem to have an issue where one of my sub mesh objects (the rings) disappear when I rotate the camera while up close. My first thoughts was clipping plan, but when I played around with the clipping plans it caused clipping but of a different sort. The mesh is one single object with sub meshes. Anyway, any suggestion on where I might look to solve the problem would be greatly appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 23, 2018 Share Posted August 23, 2018 just a guess, but maybe the camera is too close? Try making the camera a bit farther away. Also if you can try making a playground or put it on a website so everyone can see exactly what you mean. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted August 23, 2018 Share Posted August 23, 2018 This will make it so your objects won't disappear ever, but you should turn on your bounding boxes and look more at the scene: mesh.alwaysSelectAsActiveMesh http://doc.babylonjs.com/api/classes/babylon.abstractmesh#alwaysselectasactivemesh Quote Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2018 Share Posted August 23, 2018 Also other idea: can you make sure that the pivot of your mesh is correctly set (and not completely offset from the center) Quote Link to comment Share on other sites More sharing options...
JonVarner Posted August 23, 2018 Author Share Posted August 23, 2018 Thanks Deltakosh, I will look into that first and let you know if that solves it. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 23, 2018 Share Posted August 23, 2018 I bet the frustrum is saying the mesh is not visible. check your bounding box. I had this happen when I made planes with incorrect bounding boxes, it would hide them if my pivot point was not in focus but when I manually enabled bounding boxes on them it fixed it. Quote Link to comment Share on other sites More sharing options...
JonVarner Posted August 23, 2018 Author Share Posted August 23, 2018 Hey Pyrme8 I think you are on to something as I was having issues with the frustum and shadows. I am wondering if I made a mistake there. I will look into this as well. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 23, 2018 Share Posted August 23, 2018 make a cube mesh that would encapsulate the entire coil mesh. Then set the coil meshs boundingbox as the cube meshs bounding box (I think it might be a _variable but is still read/write-able...) and then dispose the cube and see if that fixes it. I cant remember exactly how I did it in the past but I think that was close to the steps. I might of actually just manually changed its bounding extents... damn I cant remember now Id have to look it up. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 24, 2018 Share Posted August 24, 2018 YOu should not have to update the bounding box as Babylon.js does it for you. I'm still on the pivot position problem Quote Link to comment Share on other sites More sharing options...
JonVarner Posted August 27, 2018 Author Share Posted August 27, 2018 Ok so I was able to fix the problem but still not 100% sure what the root cause was. Basically what was happening was that the mesh was being moved by joints. So when the rings are in the center of the scene their actual pivot point and bounding box information is that of its original state. So when I zoomed in the pivot point got clipped and I think this is what also clipped the geometry. To fix this I simply exported the mesh in the centered state so that both the center of the bounding boxs and the pivot point are at the center of the scene. At some point, I will spend more time looking into this but it seems for now I have a solution. Pryme8 and GameMonetize 2 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.