Ghostdog Posted October 17, 2016 Share Posted October 17, 2016 Hi, regarding a sphere in a sphere scenario, I would like to ask .. 1) Is intersection possible for an inner intersection event of the spheres? - If I take BABYLON.ActionManager.OnIntersectionExitTrigger this state will be reached if the small inner sphere is more than the half out of the outer sphere - If I take BABYLON.ActionManager.OnIntersectionEnterTrigger this state will be reached direct the scene is started .. and I need exact the intersection if a small inner sphere touches the inner wall of the outer sphere How to do? 2) How can a given sphere segment have materials on both sides of the mesh? At the moment I can give some material & color to the segment but if the segments turns around it is not to see anymore. My first thought was going in direction of backface culling or the DOUBLESIDE option var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {segments: 25, diameter: 5, arc: 1.0, slice: 0.2}, scene, false, BABYLON.Mesh.DOUBLESIDE); but it not seems to help. How to bring on some color to the inner side of the mesh, without having an inverse second mesh? Thanks and with best regards, Stefan Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted October 17, 2016 Share Posted October 17, 2016 Hi, please create a PG displaying your issues; http://www.babylonjs-playground.com/ Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 17, 2016 Share Posted October 17, 2016 A playground would definitely help. However MeshBuilder does not have any parameters after scene, sideOrientation is set as a property inside the options parameter check docs for http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#sphere httphttp Quote Link to comment Share on other sites More sharing options...
Ghostdog Posted October 17, 2016 Author Share Posted October 17, 2016 YES, of course! http://www.babylonjs-playground.com/#1SWPNU#5 In here I added both of my problems.. - I am in need for an inner intersection mesh scaling and in need to got the material on both sides of the segment With best regards, Stefan Quote Link to comment Share on other sites More sharing options...
Ghostdog Posted October 17, 2016 Author Share Posted October 17, 2016 .. I for now go on with double meshes by extend a second mesh wit .scaling.x = -1 for an inverse second mesh. For the intersec solution I may will take an invisible sphere as bounding mesh with a radius that fits the delta.. Thanks for the highlighs! Quote Link to comment Share on other sites More sharing options...
jerome Posted October 17, 2016 Share Posted October 17, 2016 for the double sided sphere, just set the parameter sideOrientation inside the {} : http://www.babylonjs-playground.com/#1SWPNU#6 Quote Link to comment Share on other sites More sharing options...
jerome Posted October 17, 2016 Share Posted October 17, 2016 Mesh intersection is computed according to the bounding boxes and bouding spheres... so when a mesh is "inside" another mesh, its bounding boxes and spheres necesseraly intersect. Consider the term "intersection" not like crossing each other, but more like sharing a common part of their bounding box and bouding sphere. So when one is fully included in the other, it intersects it. Ghostdog 1 Quote Link to comment Share on other sites More sharing options...
Ghostdog Posted October 17, 2016 Author Share Posted October 17, 2016 Great!! thank you for the right solution! 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.