Search the Community

Showing results for tags 'babylon'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Found 332 results

  1. Hi Everyone, i have a doubt how to run a two animation simultaneously from a same skeleton without affecting 1st one. i will play animation using below script. i want to run this two animation without out affecting 1st one. is this possible?? scene.beginAnimation(player.skeleton, 61, 126, true, 1.0); scene.beginAnimation(player.skeleton, 0, 30, true, 1.0);
  2. Hi, I have a doubt.. how to rotate and scaling the animated mesh without affecting the mesh shape and other. which was imported using the importmesh function. Advance thanks for response
  3. Using latest blender 2.79 and latest exporter from Babylon team: Camera and a cube animated 1-990 frames. On export, two things wrong occur: cube position array is cloned to camera, ensuring camera playback is dead center of cube once returned to blender, all /most keyframes sometimes deleted. As a diagnostic task, I removed the box to only export the camera, which resulted in the camera keyframes being deleted and no file exported at all, resulting in a large diagostic failure log. It appears the exporter deletes the camera and keyframes during export, then attempts to export empty data ( list out of range ) For files see : https://github.com/BabylonJS/Exporters/issues/50
  4. How to get loading screen

    how to get loading screen like this https://www.babylonjs.com/demos/sponza/
  5. Hi Everyone, How to visually check the sphere imposter shape and size of player in babylon???
  6. GUI Performance

    Hello, I am trying to use the GUI TextBlock and Image components to display an icon and a text underneath it (number count) on top of a hexagon. In the scene, there can be hundreds of hexagons at once. Without instantiating the GUI components, the scene runs with no much problem at all, 200~ hexagons at 60fps... With it, the fps drops considerably. Is there any GUI optimization advice you guys can give me? I would appreciate it. constructor(parentHex, text, sizeScale, icon) { if (global.Image) { const GUI = require('babylonjs-gui'); const materialType = MATERIAL_TYPES.DYNAMIC_LABEL; const name = `hex_label_plane_${sizeScale}`; let plane = Main.scene.getMeshByName(name); if (!plane) { plane = BABYLON.MeshBuilder.CreatePlane(name, { size: 1.1 * sizeScale }, Main.scene); Util.setMaterial(plane, materialType); Util.setScalingToZero(plane); } plane = plane.clone('clone'); plane.position = Util.getNewVector(parentHex.position); plane.position.y += (parentHex.extents.y * Config.HEX_Y_SCALE) + 0.01; plane.rotation.x = Math.PI / 2; Util.setScalingToOne(plane); plane.setParent(parentHex); plane.originalScaling = Util.getNewVector(plane.scaling); plane.setVisibility = (visible) => { visible ? Util.setScalingToZero(plane) : Util.resetScaling(plane); }; const panel = new GUI.StackPanel(); panel.verticalAlignment = GUI.Control.VERTICAL_ALIGNMENT_CENTER; this._panel = panel; if (icon) { const image = new GUI.Image('hexLabelIcon', icon); image.height = `${Config.HEX_LABEL_ICON_HEIGHT / sizeScale}px`; image.paddingBottom = `${Config.HEX_LABEL_ICON_PADDING_BOTTOM / sizeScale}px`; image.verticalAlignment = GUI.Control.VERTICAL_ALIGNMENT_BOTTOM; image.stretch = GUI.Image.STRETCH_UNIFORM; panel.addControl(image); } const textBlock = new GUI.TextBlock(`hex_label_${text}`, text); textBlock.height = `${Config.HEX_LABEL_FONT_SIZE / sizeScale}px`; textBlock.color = 'black'; textBlock.fontSize = `${Config.HEX_LABEL_FONT_SIZE / sizeScale}px`; textBlock.textVerticalAlignment = GUI.Control.VERTICAL_ALIGNMENT_TOP; panel.addControl(textBlock); this.advancedTexture = GUI.AdvancedDynamicTexture.CreateForMesh(plane); this.advancedTexture.addControl(panel); return plane; } }
  7. BABYLON Inspector Error

    I get an error when I try to run the babylon inspector with scene.debugLayer.show(); And it only happens when I go to the GUI tab. "babylonjs": "3.1.1", "babylonjs-gui": "^3.1.1",
  8. how to avoid the bouncing of sphere collider object i want to force stop of bouncing for player because i'm using cannon physics engine when the player jump over the box then the player will bouncing to very large distance in sky
  9. HI, 1. how to add a physics imposter only on front face of the cube when i collide with front face it should be detect when i collide with other 3 face it need not to detect the collision 2. avoid mesh overlapping means 2 mesh a physics enabled player & box . when player jump on the box the player should be bounced. need to avoid that bouncing Advance Thanks
  10. gltf vs babylon file

    Hello everyone, First congrats for this new v1.3 babylon version. Seems there is a lot of nice improvements and new tools! I look at the gltf file format and I was wondering what was the differences with the babylon file format? For instance I have look at some gltf files and I think they are way more light from what I saw with the babylon files. So does this this mean they would be faster to load ? I guess that once the gltf model is loaded, you will have the exact same properties as in any mesh ( materials, clone, position, etc ) ? Cheers, Pichou
  11. update gui textblock

    I have a textblock on my gui that counts how many shots I have taken in my game. I increment the shot counter successfully but I don't know how to change the number currently displayed on the screen. Here is what I am trying (unsuccessfully). scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction({ trigger: BABYLON.ActionManager.OnEveryFrameTrigger}, function () { text13.text = shots.toString(); advancedTexture.update(); }));
  12. when i create and use raycast in my scene it is in not in exact position means the below code is i'm using. based on the code the ray can be in straight line towards z axis but it is inclined var front = new BABYLON.Ray(); var frontHelper = new BABYLON.RayHelper(front); var frontLocalMeshDirection = new BABYLON.Vector3(0, 0, 500); var frontLocalMeshOrigin = new BABYLON.Vector3(0, 0, 1); var frontLength = 3; frontHelper.attachToMesh(this.__this.player, frontLocalMeshDirection, frontLocalMeshOrigin, frontLength); frontHelper.show(this.__this.scene);
  13. Hi, i need a help. i'm using 3 sprite sheet in BJS. i want to hide specific sprite. how to done this??? the below code will hide all sprite(block rendering of sprites) scene.spritesEnabled = false;
  14. Collisions with sprites

    I am making a game where I need to know if a sphere has collided with an enemy. The problem I have is that the enemies are sprites. Is there a way to check collisions with sprites?
  15. GUI overlay

    I am planning on making a game with a doom style HUD, this requires me to put a GUI image component at the bottom of the screen. I have this part working correctly, but now I would like to put GUI text components ON TOP of the image. When I try to put these elements at the bottom of the screen they do not move from the middle of the screen. Is there a way I would be able to make an overlay that goes ontop of a GUI element?
  16. Habbo WebGL Game Engine

    This is strictly for educational purposes only Since Flash is pretty much being deprecated in most browsers so is Habbo. Since there's retro versions, most of Habbo's assets are available on the internet. I've been using Pixi for now to create a 2D loading screen, which I did successfully. Then it occurred to me that Pixi is mostly just a renderer, and doesn't support 3D the same way as Three or Babylon does. Problem is that, I found coding of 2D UI elements in both Three and Babylon really difficult compared to Pixi. In Habbo it's really minimal what is going to be 2.5D / 3D as only the rooms, avatars and furni are, the rest is basically 2D GUI. So this is how I've done it for now https://gist.github.com/marcus-sa/7993baa14e6301c762747142e55cb5cf Some questions: Is Habbo; 2D with projecting, 2.5D or 3D, and would it be enough to use Pixi only? If no: Would it be possible to extend Pixi with Three or Babylon when there's going to be rendered 2.5D /3D objects? If it's truly 2D with projecting, should I just use Phaser instead? What would be best to do?
  17. Hi, i need a help. how to set a magnetic collectables for collecting the coin. like in subway surfer
  18. Hi, i want capsule imposter for my caracter but how can i done that. i'm using cannon.js plugin any other physics engine can support it
  19. Hi, i need a help, how to access the mesh properties from another function code is below... it show Uncaught TypeError: Cannot read property 'position' of undefined how to fix it BABYLON.SceneLoader.ImportMesh("", "scenes/", "a44.babylon", scene, function (newMeshes) { player = scene.getMeshByName("Character"); } console.log(player.position);
  20. Clamp Player movement

    hi, i need a help. i want to clamp the player movement in certain range. how can i fix it. now i'm using following method the moveleft & moveright is a boolean function. it is working fine. but if the character repul while colliding with collider. then the character move across the given limit. how to clamp it. if (player.moveRight && player.position.x <= 42) { player.position.x += 1; }; if (player.moveLeft && player.position.x >= -42) { player.position.x -= 1; };
  21. hoverboard setup

    Hi, i'm newbie. i need a help to setup hoverboard. The player should have physics engine and the same time the player always maintain a some gap between the board and track.
  22. I am using Blender 2.79 version and Blender2Babylon-5.4 exporter. I am getting error while exporting it to .babylon scene Attaching the blend file as well as the log file. Please help. -Ashish pump_oil_blendswap.blend pump_oil_blendswap.log
  23. Dear, All experts I want to create a character creation system like Saint Row game. The Saint Row system allow me to adjust size of each part of the body, such as chest size, arm muscle, legs and arms length. I did some research and the internet said about "Morph" technique. but I still don't understand about what this technique is about, how to do it? how to apply to be used in Babylon? Some said I have to use Blender or 3ds. The information that I got seem to be overwhelming ,but it is like a jigsaw that I don't know where should i begin first. ***Sorry,if i post in the wrong forum or category Thank you in advance
  24. hi guys, Is there a way to load 2D-resources as spritesheet in BABYLON, and I can take the frame I want by alias(frame_1.png or frame_2.png)? or if I need to do it myself, where can I set the attributes like clipX, clipY ......to get the part of image I want {"frames": { "frame_1.png": { "frame": {"x":1,"y":1417,"w":93,"h":102}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":93,"h":102}, "sourceSize": {"w":98,"h":102} }, "frame_2.png": { "frame": {"x":311,"y":1187,"w":84,"h":102}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":84,"h":102}, "sourceSize": {"w":98,"h":102} }}, "meta": { "app": "http://www.codeandweb.com/texturepacker", "version": "1.0", "image": "sprite_sheet.png", "format": "RGBA8888", "size": {"w":1922,"h":1555}, "scale": "1", "smartupdate": } }
  25. Hello community, i am new here, because i have any questions about blender + babylon.js I want to create a game (oh, really ? :D), write the logic in JavaScript and the design stuff in blender. Now i am an point i dont know how to group objects in blender, so in can use them in babylon.js I am great in Webdevelopment but terrible in blender (no experience) I am able to add stuff like tubes, cubes, etc. but not shure about how to group them so babylon.js can create meshes out of the groups. It seems to babylon.js create for every item (cubes, tubes, ...) i add in blender a new mesh. I want that when i group things, that only for the group are meshes created. (See screenshot) BTW i export every thing as *.obj And (for this point not necessary), how can in group, groups to an whole "item", like an building, car, or something else ? Thanks guys!