Jump to content

Problem with the multi-views and shadows that disappears


Dad72
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 work

And the shadow why disappears it?

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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)
Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...