Dad72 Posted January 23, 2014 Share Posted January 23, 2014 I would like to understand why the window of the mini-card passes behind the ground. When I turned the camera toward the sky, there is no problem, but when I go down, the window disappears. I also have a problem with the shadows that disappears when i moved.Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 23, 2014 Share Posted January 23, 2014 It is a depth buffer issue. Just set the renderGroupId of your minimap plane to 1 instead of 0 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 23, 2014 Author Share Posted January 23, 2014 This is not a plane that I used, but the viewport which passes behind the ground.camera2.viewport = new BABYLON.Viewport(0.85, 0.75, 0.145, 0.24);rotateCamera.viewport = new BABYLON.Viewport(0, 0, 1.0, 1.0); camera2.viewport.renderGroupId = 1; // not workAnd the shadow why disappears it? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 24, 2014 Share Posted January 24, 2014 the shadow problem may be related to a light too close (to compute shadows maps I use the point of view of the light, so if the light is too close it may not be able to see your object) The second point is a bug I've just push an updated version of 1.8.5 without the bug Dad72 1 Quote Link to comment Share on other sites More sharing options...
gwenael Posted January 24, 2014 Share Posted January 24, 2014 This fix is the one you needed dad72 for this post too: http://www.html5gamedevs.com/topic/3230-create-a-mini-map/ Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 24, 2014 Author Share Posted January 24, 2014 Thank You Deltakosh.For the shadows is ok. work.but the viewport does not work anymore, I no longer mini-map display. The viewport appears and disappears immediately when I refresh the browser. And I do not have more control on the camera. Quote Link to comment Share on other sites More sharing options...
Nico Posted January 24, 2014 Share Posted January 24, 2014 Hi,Could you try to remove your mouseup and mousedown event, it could cause the problem but not sure. Edit:I've found a weird thing :scene.activeCameras.push(camera2);scene.activeCameras.push(rotateCamera); scene.activeCameras[0].attachControl(canvas); // == camera2.attachControl(canvas);Are you sure you want to attachControl with camera2 and not with rotateCamera ? You should use this instead of your method, because if you change your camera push order, your code still work :rotateCamera.attachControl(canvas) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 24, 2014 Author Share Posted January 24, 2014 oops, Yes i had reverse the camera. It works like this. scene.activeCameras.push(rotateCamera);scene.activeCameras.push(camera2);scene.activeCameras[0].attachControl(canvas);What solves all the problem. Thank You Nico Quote Link to comment Share on other sites More sharing options...
gwenael Posted January 24, 2014 Share Posted January 24, 2014 I think Nico was suggesting you to write:rotateCamera.attachControl(canvas); instead of referencing it with scene.activeCameras[0] Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 24, 2014 Author Share Posted January 24, 2014 is the same, this also works. You seem always to want to me resume. Quote Link to comment Share on other sites More sharing options...
gwenael Posted February 18, 2014 Share Posted February 18, 2014 You're right, rotateCamera and scene.activeCameras[0] refer to the same camera but if I'm not wrong using rotateCamera will be faster than using scene.activeCameras[0] since by using scene.activeCameras[0] you ask javascript to access to a property (activeCameras) of an object (scene) and then to an element of an array ([0]). I can be wrong, I'm not a javascript expert, but it would be the case in C++. It was only an advice dad72. I'm trying to help here as I tried to help in other topics. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 18, 2014 Author Share Posted February 18, 2014 I think that you have reasons, it may be faster, since more direct. I know that you made your best to help and I thank you. I think that this forum really do lack of assistance. There are a lot of question, but the answers are very low or very vague, see ignore. 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.