jobsboris27 Posted February 29, 2016 Share Posted February 29, 2016 Hi there! I will create simple 3D game, where i can change active camera. But how create a body for camera, for example - I chanched active camera and i can see the other camera(view of camera, square or circle of camera); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 29, 2016 Share Posted February 29, 2016 Hello and welcome, you can create any mesh and set mesh.parent = camera jobsboris27 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted February 29, 2016 Share Posted February 29, 2016 Welcome @jobsboris27. Here is a playground http://www.babylonjs-playground.com/#1P7A7R showing what @Deltakosh said to do. Cameras are invisible (they have no size) The three cameras are placed at the corners of an equilateral triangle and they look in the direction of the mid-point of the opposite side. For each a box is created and the box given a camera as parent and coloured red, green or blue. Switching the camera number in line 19 changes the active camera and gives a view from that camera. If rather than a box you wanted something that looked like an actual camera then you could build one from a variety of meshes. GameMonetize and jobsboris27 2 Quote Link to comment Share on other sites More sharing options...
jobsboris27 Posted March 1, 2016 Author Share Posted March 1, 2016 Thanks to all! That's great! 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.