Alex10 Posted December 11, 2015 Share Posted December 11, 2015 I want to have a camera (the player) does not go beyond the stage. So I applied checkcollision on skybox. But it was used outside Cuba behind the scenes and inside the camera falls down from the edge of the stage.var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(80, 5, -10), scene);camera.setTarget(BABYLON.Vector3.Zero());camera.ellipsoid = new BABYLON.Vector3(2, 2, 1);camera.checkCollisions = true;camera.applyGravity = true;// Skybox var skybox = BABYLON.Mesh.CreateBox("skyBox", 390.0, scene); var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene); skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/skybox", scene); skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE; skybox.material = skyboxMaterial; skybox.checkCollisions = true; Quote Link to comment Share on other sites More sharing options...
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.