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 341 results

  1. Animation not playing

    Hi Everyone, If i load the game in first time it doesn’t load the animation for some time and the character looks frozen But i'm first time facing this issue how can i fix it???
  2. Сoordinates to the object

    Hi friends! Is the object A is object B. Is there a way to give new coordinates to the object B, but so that the center coordinates was the object A? But object a does not become the parent of object B!
  3. Model flip issue

    Hi Everyone, I was stuck in modelling. when i use 3d model of unity and then i was converted it to babylon file using 3ds max. but sometimes in rendering the model will be look like image below. Anyone know why it is happening to me
  4. Warp Effect

    Hi friends, how to add the warp effect in my world. i need warp effect without using the shader like this; http://www.babylonjs-playground.com/#1WBBW0#1 how to get warp effect using the jquery-warpdrive in my world ref: https://www.jqueryscript.net/animation/Warp-Drive-Starfield-Effect-jQuery.html can you have any idea about this?????????....... Thanks
  5. Hi friends, it is syed, https://doc.babylonjs.com/how_to/group#forming-a-group how to group the animation from the mesh, i'm having 2 animated meshes how to group the animation of two meshes
  6. How to join two mesh

    Hi Everyone, How to attach the two meshes using script. for example: Two meshes i) skateboard ii) player(animated with 3ds max) i will use this to attach sword.attachToBone(skeleton.bones[34], character); Note: i want to attach two meshes i) the skateboard don't move while playing the players animation Advance Thanks...
  7. Complex animation

    Hi Everyone, i have a doubt. i'm using complex animation. i want to play, stop and restart based on the situation, i was refer the documentation https://doc.babylonjs.com/babylon101/animations my script was given below but i was not running. is there anything wrong in this script idleAnim = scene.beginAnimation(player.skeleton, 0, 60, true, 1.0); idleAnim.restart();
  8. Rescale Skybox size

    Hi Everyone, i have a doubt. How to get big skybox. i need the size 2500 is this possible i'm using this script skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene); var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene); skyboxMaterial.backFaceCulling = false; skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("assets/skybox/skybox", scene); skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE; skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0); skybox.material = skyboxMaterial;
  9. Hi Team, I am using arc rotate camera in the scene. There is delay/animation in panning when pressed control+drag. I want the panning to happen on the go without delay. I am trying to modify the native library code for arc rotate camera, but the snippet itself is loaded with delay. Is there a way to disable delay/animation in panning effect? if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) { console.log('Start Drag---------------') console.log(new Date()) if (!this._localDirection) { this._localDirection = BABYLON.Vector3.Zero(); this._transformedDirection = BABYLON.Vector3.Zero(); } this.inertialPanningX *= this.inertia; this.inertialPanningY *= this.inertia; if (Math.abs(this.inertialPanningX) < BABYLON.Epsilon) this.inertialPanningX = 0; if (Math.abs(this.inertialPanningY) < BABYLON.Epsilon) this.inertialPanningY = 0; this._localDirection.copyFromFloats(this.inertialPanningX, this.inertialPanningY, this.inertialPanningY); this._localDirection.multiplyInPlace(this.panningAxis); this._viewMatrix.invertToRef(this._cameraTransformMatrix); BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection); //Eliminate y if map panning is enabled (panningAxis == 1,0,1) if (!this.panningAxis.y) { this._transformedDirection.y = 0; } if (!this.target.getAbsolutePosition) { this.target.addInPlace(this._transformedDirection); } console.log(new Date()) console.log('End Drag---------------') } also tried setting various values to speed, panningSensibility, cameraAcceleration.
  10. 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);
  11. 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
  12. 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
  13. How to get loading screen

    how to get loading screen like this https://www.babylonjs.com/demos/sponza/
  14. Hi Everyone, How to visually check the sphere imposter shape and size of player in babylon???
  15. 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; } }
  16. 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",
  17. 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
  18. 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
  19. 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
  20. 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(); }));
  21. 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);
  22. 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;
  23. 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?
  24. 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?
  25. 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?