Boz

Members
  • Content Count

    103
  • Joined

  • Last visited

2 Followers

About Boz

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Bretagne

Contact Methods

  • Skype
    pouet--

Recent Profile Visitors

2033 profile views
  1. Hey, The fact is I can't use the mouse during the character is moving.. I know about the pointerLock but it doesn't solve the problem. I looked into your code but don't understand if you prevent mouse action during key_pressed or something.. Could you help ?
  2. Hello @satguru, thanks for this great addition ! It really fits my needs, except one thing : I prefer to use the mouse to move left and right instead of A and D keys. But you disable the mouse from moving when the character is walking. Is there any solution to enable the mouse controls and character movement in the same time ? Thank you very much
  3. Don't you want to initialize foundDisabled to false ? Nice answer anyway
  4. I was looking for Wingnut solution's, and I like John's one Thanks both !
  5. Hello ! I started a question, but finally got the answer I can't delete this topic, so why not share it ? I created a ParticleSystem emitting particles along a circle, for a "tube" effect : http://www.babylonjs-playground.com/#U64HVU#1 This has been done by redefining the startPosition() function for manually positionning particles at launching. I had to add a variable to know the total number of emitted particles : just create a particleSystem.cpt var and increment it at the end of the function. Memorizing the total number of particles can help achieving nice effects with trigonometry. Enjoy
  6. You can create instances of your mesh : https://doc.babylonjs.com/tutorials/how_to_use_instances I made a playground for you : http://babylonjs-playground.com/#MVSEV
  7. Thank you for your answers, for now I was simply converting models in Blender, from .obj to .babylon. I will take a look at the scale when exporting But I was mainly talking about objects as basic shapes : if I have a scene which contains a map and elements as basic shapes, what is the best scale ? The bigger the map, the more expensive the computation ? I made a compromise between map size and height of objects to get a correct texture rendering from the character point of view. I will use LOD and optimization tools and make some tests, thanks !
  8. Hello there ! I was wondering if the 3D size of objects in the scene matters. Is it better to create a 500x500 ground with 2x2x2 cubes or a 2000x2000 ground with 8x8x8 cubes ? Is there any difference (computation time, stretch..)? I was using basic 1 diameter objects in all my game and the ratio looked good, but now I try to use Canvas2D and WorldSpaceCanvas2D is about 150x150, 33% of my map size ! I tried to resize but I got so many problems with text resizing.. So I decided to multiply every object size by 4 to get a correct ratio with the canvas2D, now it's good. (my map is a bit flattened now but I will find a new HeightMap for my ground, no big deal). I have 8-diameter spheres, 2000x2000 map, and it sounds very big. Can someone tells me what is the best way when thinking about a not-so-small scene with lots of objects ? Thanks in advance ! Pouet
  9. Boz

    WIP Rpg

    I created an account but when I go to the 'Game' page I always get 'GameServer seems to be offline'.. I want to test it
  10. Hey, good to see some future multiplaying You can create your lobbies as an array of length 2 : lobby[0] is team 1, lobby[1] is team 2 (4 players in each array). // list of lobbies var lobbies = []; // new lobby var lobby = []; lobby[0] = []; lobby[1] = []; lobbies.push(lobby); // When a player comes, put it in the correct team lobby[0].push(id); // team 1 or lobby[1].push(id); // team 2 // When you're ready, search for another lobby to complete // iterate over lobbies and look free space in team 1 and 2 for(var i=0; i<lobbies.length; i++) { var lobby = lobbies[i]; // if(myLobby[0].length <= (4 - lobby[0].length) && myLobby[1].length <= (4 - lobby[1].length) ) { // Match found ! // mix your arrays here to make only one // and search again with this new array if there is free space } } It's my first though about it, good luck with that
  11. Nice feature !! (what do you mean by adding blending?)
  12. Hey ! I've tested your code at https://www.loudened.com/terrain/ It runs at 35 fps on my computer with CPU i7-4720 The "freeze" could be a bit annoying when a new chunk loads, what do you think is the best compromise between chunk size and loading time ? Keep going, nice to see good news here !
  13. Hey ! I don't know why but I got a problem with this same function.. Maybe a problem with v2.4 ? I go inside the babylonjs code but it should work. So I created my own function, which works well : var groundHeightAt = function(x, z) { // Create ray from position x,z at the maximum altitude and launch it vertically to hit the ground var maxHeight = // define your max height // mine is skybox.getBoundingInfo().boundingBox.maximum.y var ray = new BABYLON.Ray(new BABYLON.Vector3(x, maxHeight, z), // Origin new BABYLON.Vector3(0, -1, 0), // Direction 2*maxHeight); // Length var res = ground.intersects(ray, true); return res.pickedPoint.y; } Where is the difference ?
  14. Thanks Dal for this promising feature. Do not worry too much about performance, you already had a good idea which can be improved I wish I could help you but I don't have enough skill/time so far :X Good luck !