Search the Community

Showing results for tags 'babylon'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 397 results

  1. I have a character, a target (a box attached to a camera) and wall. For some reason, when Target is behind Wall, Character can still see the bloody Target! What's the correct way of using pickWithRay? Is there a way to visualize rays, e.g. draw a line?
  2. Given position and rotation Vector3-s, how do you convert to cartesian? I've found a C++ solution, but I get strange results in BJS
  3. Hi, How do you unload a scene? There's a BABYLON.SceneLoader.Load, but no Unload? How do I remove a scene completely? Here's my dilemma: I've got a game with 3 levels. I'm not loading assets through the assets manager as all three scenes are Blender exports (with lights and cameras set up). At the end of each level I want to unload the previous scene (instances, clones, sounds, etc) and load a new one. Surely there must be a way, but I just cant find it... Thanks!
  4. Error on PG: Compilation error Your browser does not support WebGL Chrome v. 54.0.2840.98, OS X 10.9.5 Any PG results in this error with the above version of Chrome; Safari and Firefox are OK. Bummer!
  5. Hi, I've searched the forum, but most questions and answers that I found relate to the reverse: convert World to Screed coordinates. The reason I need this is to launch a projectile in the direction of mouse coordinates when a user clicks on a screen. I tried the ray picking approach, but 1) it's too cumbersome and it didn't work, and 2) there's nothing to pick with a ray! I wonder if anyone here had the same issue and managed to find a solution. Cheers!
  6. I'm doing a game for university and i don't know how to make it start and restart, like when you open the game page and when you lose, to restart, how should i do that? Basically, the game should start when i press some button, keep going for a time and when the time reachs zero the player lose, his score is showed and he can press a button to restart. I'm noob on javascript, learning just for this game. I already got help here and i'm learning things slow, but couldn't manage to do that, any help?
  7. Hi, I'm CDN'ing in Babylon 2.4 and I'm wanting to know about pep Do i need to include jquery before i include pep in order for it to be useful like the pep docs say i should ? Thanks.
  8. Hi, I use new version of Blender(2.78a) and I have my model in it, so I tried to export it to .babylon file. I got exporter file from Github just now and I have already move to Blender's addons. When I tried to export my model it got this error(in the picture that I have attached), but when I tried to export a normal cube, I could do it. With the same model, I can do it with the babylon exporter that come with babylon v2.4 and previous version of Blender. But for both new version of Blender and Babylon i can't. Thank you in advance Peace
  9. Hi there, I'm trying to get a simple animation exported into Babylon. However, I've run into a problem. Here is a link to how the animation looks in 3ds max. Looks correct. Here is a link to what the animation looks like in Babylon. Look to the right to see the rover. It's firing out its wheels!! The animation keys were added directly to the bones. (I'm not sure if that's relevant or not.) Also as a sidenote, I've tried the Unity 5 exporter. It also does not export animations correctly. Any clue as to what's happening?? What steps can I take to make sure my animations come out correctly? Thanks!
  10. Hi, I wonder if it's possible at all to pre-bake shadows at runtime? I've got a scene that is generated by users. Position of items is thus unknown. I'd like to cast shadows from these items, but it's too costly CPU-wise. It would be really cool if one was able to run something like BABYLON.bakeGroundShadows(objectsList) which would create texture on the fly for the ground mesh (I'm aware that baking and creating textures for all meshes can max out GPU memory).
  11. Hi, Is there a built in way to "lookAt" a point in 3D space, using only 2 coordinates( x and y ). I found a lookAt function from this forum, but that used 3 coordinates which screws up the camera and player orientation. Id like to keep my player's z rotation always at 0.
  12. Hi everybody, I am very new to both Blender and Babylon. Basically I am trying to load a scene exported from Blender and create a skybox afterward, the scene is nothing more than a default blender scene(the one consists of a box, camera and light, I load this scene just to make sure I hadn't added or modified anything in the scene that may leads to other issues once I export the scene into babylon file). I try to create a skybox after loading the scene, using code below: =============================================== var canvas; var engine; var scene; function initScene() { canvas = document.getElementById("renderCanvas"); engine = new BABYLON.Engine(canvas, true); scene = new BABYLON.Scene(engine); BABYLON.SceneLoader.Load("babylon/","testScene.babylon",engine,function(newScene){ newScene.executeWhenReady(function(){ newScene.activeCamera.attachControl(canvas,false); var ground = BABYLON.Mesh.CreateGround("ground", 10, 10, 2, newScene); var skybox = BABYLON.Mesh.CreateBox("skyBox",1000.0,newScene); var skyboxMaterial = new BABYLON.StandardMaterial("skyBox",newScene); skyboxMaterial.backFaceCulling = false; skybox.infiniteDistance = true; skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("images/skybox/cloudSkyBox/DaySkybox", newScene); skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE; skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.disableLighting = true; skybox.material = skyboxMaterial; engine.runRenderLoop(function(){ newScene.render(); }); }); },function(progress){}); } function initBB(){ if (BABYLON.Engine.isSupported()){ initScene(); }else{ console.log("not support BB"); } } document.addEventListener("DOMContentLoaded",initBB,false); document.addEventListener("resize",function(){ engine.resize(); }); =============================================== The blender scene "newScene" is loaded(I can see the box, a directional light of the blender default scene, I can use the free camera preset in blender scene), the ground mesh added into the newScene can be seen as well, but the skybox is not shown! There is no error message shown on the browser console, I had tried to google for similar problem but couldn't find the solution... I am not sure if I set up the blender scene wrongly before I export or there is other factor that cause this issue. Any help would be greatly appreciated!
  13. Hi I'm starting to love programming in Babylon.js but I do not know how to do it. I am modeling a scene created 3D Max, exported Babylon.js (save this page). I leave several files but do not know how to take each scene objects and encourage them to coordinate parameters to then play one or the other animation as I want. I know it can be done by planning everything from the beginning but I want to take some objects made in 3D Max, put the mechanism progragramació and render it in the browser.
  14. I see a framerate drop in the latest 2.5 compared to 2.4. It's not huge: about 5-6 FPS, but still noticeable.
  15. Hi, Another head scratcher for me: I'm trying to cast rays to detect if an a object (A) is in "view" of another object (B). B has got lookAt(A) attached to it, so this is how I'm constructing the ray: var ray = new BABYLON.Ray(this.mesh.position, this.mesh.rotationQuaternion.toEulerAngles().normalize()); It's not working, so what am I doing wrong?
  16. Hi, Is there a way to extract a bone's World position? I need an actor to pick up a rock and throw it. ELI5, please!
  17. Is there any comprehensive es6 boilerplate for Babylon? For Phaser is a lot, but for Babylon I haven't found yet. If somebody has done some kind of boilerplate, could I get it also?
  18. Hey guys, I've a problem with the FbxExporter. Every time I export my model I only got the model without textures(only 2 textures, the texture of the roof and the wood texture) and if I try the model in the Sandbox it has only 5 -15 fps but I exported with 60 fps. Please help! ;( ~ Marc
  19. There is some issue when export 3DMax format file to .babylon. blow is my 3DMax file.
  20. Hi, I use scaling to make my gameobject "grow bigger", however i noticed it's having an unusual/weird effect on the camera that is a "child" of that object. ( camera.parent = my_gameobject) Basically objects will disappear into blind spots that appear. If scaling is very low, then everything disappears. I also noticed that scaling effects players position/translations even though it shouldnt( i think ). For example if i scale down my object 5 times, then it seems to move/traverse 5 times slower. What other effects does scaling have on a mesh/its children aside of scaling its geometry. Also how do i scale without messing up the camera, or what changes do i need to apply on camera to undo the scaling on its parent ?
  21. How can i do the babylon libary autocompletion for sublime text? ive looked eveywhere on forums but i cant find it. it will really help me when im programming. if not sublime text how can i do it for any text editor? is there is step by step guide? please help
  22. Hi everyone, A bit of a babylon philosophical question here. I want to deal with a massive amount of spheres, and want to keep it as smooth as possible. I thought I would hide spheres which are no longer in the view frustum. Now that I got that code, I wonder what is the most efficient, either to hide the meshes by selecting and applying .visibility = 0, or if it is better to dispose of the meshes ? If you're curious, in my case I only rotate the camera and don't move it, and I know what I have to show thanks to the angles within a database. Currently, Babylon still feels a bit too slow to my taste with many elements hidden. Should I change my code to dispose of the meshes and recreate them instead of hiding/showing ? Best, Kevin
  23. Hi, Im looking for a way to place objects relatively to other nested objects. ( objects that have a chain of parents that have been moved, rotated ). I searched the docs but couldnt find anything that could do what im looking for. Ive tried position.add / addToRef etc but they dont take object's rotation/parent chain into account. An example of what id like to do: A player turns 90 degrees in x direction. A weapon that is parented to the player, turns another "n" degrees. Now, how would i put a bullet at the tip of the weapon. ( without setting its parent = weapon ). After the bullet is created, it would move/follow objects in global space/coordinate system. in pseudo code: bullet = new Bullet();//extends Mesh. bullet.position = player.weapon.position.clone().translate(BABYLON.Axis.Z, weapon_barrel_length, BABYLON.Space.LOCAL); Note: position object doesn't have translate function, only mesh. My actual case is a bit different but this example explains it better.
  24. Hi, I created a mesh using CreateLines function. The function works as it should, but the lines are drawn white. I tried giving it a material, but it throws an error, telling me there is no setter. I tried modifying using mesh.material.setColor3 and 4 and other properties, but they had no effect. How can i change the color of the lines. And also give the lines some shading, just like wireframe materials do. PS: i cant use regular mesh with wireframe material because it creates triangles and adds extra lines. E.g if i draw a square face, then wireframe view shows diagonals too.( like 2 triangles )
  25. Hi, Im relatively new to babylon, and i find its animation's api somewhat confusing. Atm, my problem is making a game object jump forward. I managed to do that, but the animation is applied to the object's position coordinates in using world orientation. If my game object rotates e.g 90 degrees, then the jump will be animated sideways, not forward. How can i tell the animation api to use local coordinates(translate property value ).