Dad72 Posted January 28, 2014 Share Posted January 28, 2014 It would be useful to have the possibility to deactive the points of view. For example, if I select a camera of the scene (camera with gizmo), i displays the point of view of this second camera, but if I select a cube, I would like to be able to disable the point of view of this second camera on my scene.Is this possible? Or a member 'isdisabled', 'Clear' could it not be add? Thank You Deltakosh. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 28, 2014 Share Posted January 28, 2014 Could you be more precise? I do not understand what you need Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 29, 2014 Author Share Posted January 29, 2014 On my terrain editor, I can add objects, lights, cameras which have the gizmos when have the selected. And when I selected a camera, I added a viewpoint for the one below of ways that the users can adjust the point of view of the camera with the gizmo of transformation. But if I select another objects, the window is always present on the scene, but I would like to be able to delete or hide this viewpoint. The viewpoint should be displayed that when a camera is select.I was wondering if you could add the ability to delete or hide a point of view. exemple :cameraFree[0].viewport = new BABYLON.Viewport(0, 0, 1.0, 1.0); //=> CreatecameraFree[0].viewport.delete(); //=> Delete------En français. Sur mon éditeur de terrain, je peut ajouter des objets, des lumières, des cameras et autres qui ont des gizmos quand ont les sélectionnent. Et lorsque je sélectionne une camera, j'ajoute un viewpoint pour celle ci de façons à ce que les utilisateurs puisse ajuster le point de vue de la camera avec le gizmo de transformation. mais si je sélectionne un autre objets, la fenêtre est toujours présente sur la scène, or moi je voudrais pouvoir supprimer ou masquer ce viewpoint. Le viewpoint ne doit s'afficher que quand une camera est sélectionner. Je demandais donc si vous pouviez ajouter la possibilité de supprimer ou masquer un point de vue. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 29, 2014 Share Posted January 29, 2014 Could you just remove the given camera from the activeCameras ? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 29, 2014 Author Share Posted January 29, 2014 Yes it work.function remove_item(arr, value){ for(b in arr ){ if(arr[b] == value){ arr.splice(b,1); break; } } return arr;}remove_item(scene.activeCameras, camera2);Thank you Deltakosh 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.