• Content Count

  • Joined

  • Last visited

  1. Hi, Is it possible to stop or freeze the Babylon engine? I don't want it and the WebGL completely to crash - perhaps just stop the render loop. Another question - kind of related: I have a game with some conditions to see if the player finished the maze or not. It's based on simply certain camera positions. How should I implement this properly? I could use IF statements in render loop to see if the the conditions are met. Is the renderloop the ideal place to put it? How to make a some sort of an event listener to see if the camera position is what I'm looking for? -Karpo
  2. Hi. I simply changed engine.isPointerLock into 'true' and pretty much got what I was looking for. I see the engine having a method switchFullscreen(). I guess this is for asking the browser to go into fullscreen. I couldn't quite figure out what to give it as a parameter - didn't work just by calling engine.switchFullscreen().
  3. Hi - again, Any tips on how should I change the default behavior of FreeCamera to make it more FPS like. By this I mean: mouse down not required to rotate. This would probably cause some usability challenges in browser environment but maybe allow user to go full screen mode (how to do this?) would help. Thanks in advance for the replies and once again good job on making BJS fun! -Karpo
  4. Excellent. Did the trick! Thanks.
  5. Hi, I made this simple maze FPS game and it works fine but I have difficulties with the FreeCamera. The labyrinth is generated and made out of planes (walls). The idea was to throw the FPS camera to the maze and let the player character find a way out. The problem I have is the camera collision detection, probably. Most of the time when my poor badly lost character walks and hits the wall, it gets kind of stuck and then slowly pulled into the other side of the wall. The collision detection works sometimes though. Are there any tips for making the camera collision better or idea what causes this behavior? FYI The maze's walls are made of planes, all walls have a size of 1. At first it's kind of a grid and then I tear down the walls with an algorithm to make the cells available the player to move into. After generating a complete labyrinth I'm left with lots of planes where two planes are exactly in the same position. This is intentional. So other cell's wall (plane) against the another cell's wall. Just wondering - would this two meshes sharing the same position somehow confuse the collision detection? -Karpo
  6. Hi, What tools would you all recommend for creating realistic landscapes and bring them to Babylon? I guess the Blender is the tool to put it all together but would you use Blender for creating worlds (hills, rocks etc.) with textures? There's this Train demo example in the Babylon homepage. What tools were used to create that landscape? Thanks in advance.
  7. Great. Thanks. I couldn't come up with any other invisible impostor than cube with texture alpha set to 0. Does the job. One way to do the FPS counter (from Stackoverflow) in renderLoop is: var lastCalledTime; var fps; if(!lastCalledTime) { lastCalledTime = new Date().getTime(); fps = 0; return; } delta = (new Date().getTime() - lastCalledTime)/1000; lastCalledTime = new Date().getTime(); fps = 1/delta; console.log(fps); // use it in an overlay etc.
  8. I'm quite impressed of Babylon.js so far. Couple of questions though. 1. I've now learned how to export/import meshes from other programs into Babylon scene. I wonder if Babylon library allows me perhaps optimize the mesh performance wise somehow by decreasing amount of vertices/polygons dynamically or other image quality values. For example I have this teletubbish landscape mesh generated from L3DT (imported as an. obj to babylon) - seems like I'm very soon getting low fps and I'd like to look into a bit more. The 3D software I use report the landscape having 34k vertices and 69k faces but I have no problem running 60fps "the Car" demo at babylonjs.com with a million vertices. 2. For the landscape - Is the more "proper" way to go with a seperate heighmap where I could control the mesh subdivision? 3. Additionally - I'm using camera with gravity and collision detection for simulating FPS. Could this be a resource hog? 4. How to add FPS/Vertices/time used per frame counter/stats visible in many of the demos at http://www.babylonjs.com/ Thanks in advance, Karpo
  9. Ok got it! I had a feeling that this is something I'm doing something wrong... Note to self. Learn how to save github files properly. Thanks.
  10. Hi, Still learning how to use Blender but I can't figure out how to add this Babylon exporter/importer for Blender (version 2.6.7). I followed the instruction and put the .py file under \blender\2.67\scripts\addons\ . Restarted the program and all. I still cannot see the Import/export Babylon.js under the Preferences / import&export list. I have also tried to install it from the file but nothing happens. I'm not getting an error or anything. Any ideas what I'm doing wrong? Br, karpo