CodeIain Posted April 24, 2017 Share Posted April 24, 2017 Hi All Am having a issue with my camera, when I try and walk up my terrain i can see through it. I have base my code on http://www.pixelcodr.com/tutos/shooter/shooter.html But I have added @NasimiAsl infinity terrain to my code. I have attached a image of the issue am getting and all my code can be found here https://github.com/codeiain/MMORPG/tree/Develop/src/providers/GameService I have been banding my head against this all day so any help would be great. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted April 24, 2017 Share Posted April 24, 2017 you can use collision too scene.collisionsEnabled = true; //Then apply collisions and gravity to the active camera camera.checkCollisions = true; camera.applyGravity = true; //Set the ellipsoid around the camera (e.g. your player's size) camera.ellipsoid = new BABYLON.Vector3(1, 1, 1); //finally, say which mesh will be collisionable mesh.checkCollisions = true; http://www.babylonjs-playground.com/#1QC9DP#148 and look line // camera.position.y = 5.+height_Map(camera.position); after you use collition you dont need this GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 26, 2017 Share Posted April 26, 2017 Hi guys. Is there a potential camera.minZ issue, too? Crank minZ low low low. NasimiAsl 1 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.