BangTao Posted January 12, 2017 Share Posted January 12, 2017 I'm a trouble maker。。。。。。somebody can tell me why there is always intersect between mesh and mesh..i'm confused.... http://playground.babylonjs.com/#ONJ2Q#1 thanks for u time. Quote Link to comment Share on other sites More sharing options...
adam Posted January 12, 2017 Share Posted January 12, 2017 It's because the world matrices haven't been computed yet. Here I call scene.render() before your test: http://playground.babylonjs.com/#ONJ2Q#2 Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 12, 2017 Author Share Posted January 12, 2017 On 1/12/2017 at 9:45 AM, adam said: It's because the world matrices haven't been computed yet. Here I call scene.render() before your test: http://playground.babylonjs.com/#ONJ2Q#2 Thx,The count1 should not equals 0,i think..cause the pickBox is from(0,0,0) to(9,9,9) ,and these two Mesh should intersect, several times 啊 Quote Link to comment Share on other sites More sharing options...
adam Posted January 12, 2017 Share Posted January 12, 2017 http://playground.babylonjs.com/#ONJ2Q#3 Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 12, 2017 Author Share Posted January 12, 2017 On 1/12/2017 at 9:58 AM, adam said: http://playground.babylonjs.com/#ONJ2Q#3 yup.thx,and if i cycle 1000000 times,which i turned i,j,k into 100.....then i lost browser if i put scene.render() in the loop....) Quote Link to comment Share on other sites More sharing options...
adam Posted January 12, 2017 Share Posted January 12, 2017 Use computeWorldMatrix: http://playground.babylonjs.com/#ONJ2Q#4 Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 12, 2017 Author Share Posted January 12, 2017 On 1/12/2017 at 10:09 AM, adam said: Use computeWorldMatrix: http://playground.babylonjs.com/#ONJ2Q#4 That works,Thank u adam,haha.Thank u Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 12, 2017 Author Share Posted January 12, 2017 On 1/12/2017 at 10:09 AM, adam said: Use computeWorldMatrix: http://playground.babylonjs.com/#ONJ2Q#4 hey bro,i wanna know if i can get the intersect's block?just part of the box which same size with the pickbox.thx for your time. 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.