All Activity

This stream auto-updates     

  1. Past hour
  2. Implementing click navigation. Trying to get skeleton animations & path navigation to work nicely together. I start the player walkAnim and then begin animating player.position along a path. The walkAnim is promptly interrupted and the player glides along the path, after which he continues walkAnim for a short time. I considered moveWithCollisions, but It navigates to a point, not an array of points, I would have to loop over the path array and check whether or not Ive reached a point, then moveWithCollisions to next point in path. Starting to feel out of my league so decided to share my woes with all you. Failed miserably at importing the babylon-nav-mesh navigation library into a playground (, so I'm just gonna post some code here. BABYLON.SceneLoader.ImportMesh("","","dummy3.babylon",scene,(meshes,particleSystems,skeletons)=>{ var skeleton = skeletons[0]; skeleton.enableBlending(0.2); player = meshes[0]; player.skeleton = skeleton; player.position = new BABYLON.Vector3(-2.7426157086231813, 0.32968033243017736, -5.410392414960055); player.checkCollisions = true; canvas.addEventListener('click', function(event) { var pickingInfo = scene.pick(scene.pointerX, scene.pointerY); if (!pickingInfo.hit) return; var walkRange = skeleton.getAnimationRange("YBot_Walk"); var walkAnim = scene.beginAnimation(skeleton, walkRange.from,, true); var path = navigation.findPath(player.position, pickingInfo.pickedPoint, 'level', navigation.getGroup('level', player.position)) || []; console.log('path', path) //if path is defined, create path animation frames and beginAnimation on player if (path && path.length > 0) { var length = 0; var direction = [{ frame: 0, value: player.position }]; for (var i = 0; i < path.length; i++) { length += BABYLON.Vector3.Distance(direction[i].value, path[i]); direction.push({ frame: length*100, value: path[i] }); } for (var i = 0; i < direction.length; i++) { direction[i].frame /= length; } var move = new BABYLON.Animation("CameraMove", "position", 180/length+10, BABYLON.Animation.ANIMATIONTYPE_VECTOR3, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); move.add move.setKeys(direction); player.animations.push(move); scene.beginAnimation(player, 0, 100); } }) engine.runRenderLoop(function(){ scene.render(); }); }); While I'm here wanna throw out two other questions I have yet to concieve an answer for. How to smoothly adjust the player to lookAt points along its path? How would key controls(wasd) be implemented in conjunction with a click navigation system? Create small incremental paths?
  3. Today
  4. samid737

    Change cursor on demand

    You could fetch the game canvas and change its CSS cursor property. e.g: = "zoom-in" //or = "zoom-in"
  5. @phaselock, it looks like a bug, I'll look into it Could you please let me know some more informations like your browser version? system?..
  6. Dreik

    Missing Grid in Babylon GUI

    thank you !
  7. dcgames

    [WIP] Online Domino Games

    Your CPU goes to 25% on your turn? That is interesting.. On player's turn the game simply does nothing. When bots play, it does a lot so its just opposite behaviour and I gotta look into it then. Thanks for your other feedback. Very much appreciated. I plan a series of video tutorials which will come after all games are done.
  8. Asagi

    VideoTexture not working on ios

    That's great. Thanks! Can i change webcam source? For ex: front camera, back camera
  9. Nabroski

    Using Arrays With ShaderMaterial

    for loops ?
  10. Nabroski

    Updating A Shader Material Frag Shader

    just in case someone find this post lurking for how to use struckts, i leave it here. UniformBufferObjects would be nice anyway.
  11. --- CURRENTLY LOOKING FOR WORK! --- I've just had 3 projects finish which are under an NDA agreement which are all very exciting, but now i'm on the hunt for some new projects! SO IF YOU LIKE WHAT YOU HEAR, GET IN TOUCH! Thanks, Nathan
  12. Hello, This is exactly what we do using renderPipelines. It is actually used extensively in the DefaultRenderPipeline to reuse RTT as much as we can: The documentation is available here: and you can see some sharing examples here: Hope that can help getting you started.
  13. Legomite

    Change cursor on demand

    Is there currently a way to change the mouse cursor on demand? I want the cursor to change during a pointer down event, so far it appears that the only way to show a new cursor is by hovering. If anybody could help, that'd be awesome
  14. Sebavan

    GUI 2d shapes

    In case you do not want separate render group you could also rely on zOffset which has been added to prevent z-fighting:
  15. For sure, but it is already great 🙂
  16. ftguy2018

    Sprite Atlas with texture & bug in the Spine Plugin

    Also I found a bug in the Spine plugin, when there is a change in the attachment for a slot, the plugin will create a new object and not replace the old one, if you play the attached file to reproduce the issue, there is 1 animation idle_1 for the dragon , you need to turn the debugger panel on and you will see wings are created all the time, eventually it will reach hundreds of draw calls and frame rate will drop.
  17. Hi guys, I would like to know if the each PostProcess creates internally a new render target texture and never reuse what could be potentially reused? Normally we could just use two or three render targets and play ping-pong with them to finish the whole post process. Is it doable? Thanks
  18. Can I submit it later? I want to improve its function.
  19. Eric Matyas

    Building a Library of Images for Everyone

    Brand new seamless images are ready on the following pages: TXR - BRICK TXR - ROCK/STONE 2 TXR - VEGETATION Make sure to scroll down...they are down toward the bottom of each page. See you Thursday with more new music!
  20. Eric Matyas

    Building a Library of Images for Everyone

    Brand new seamless images are ready on the following pages: TXR - BRICK TXR - ROCK/STONE 2 TXR - VEGETATION Make sure to scroll down...they are down toward the bottom of each page. See you Thursday with more new music!
  21. ftguy2018

    Sprite Atlas with texture & bug in the Spine Plugin

    Yes, I think there is a problem with atlas from spine and atlas for the game engine, if I export the sprite atlas using the "Spine option" from texturepacker, the atlas file can be loaded (thought I do not know how to use it) at least it does not crash, but if I export using the "panda2 option" from texturepacker it does freeze at the initial loading, can you please kindly advise how to fix this ?
  22. Linzeestomp

    Multiple Tilesets for one layer

    It looks like Phaser doesn't currently support multiple tilesets PER LAYER. The current type accepted by the create layer methods are string only it looks like. You can however use multiple tilesets on different layers in the same map atlas. You could just use one layer with one tileset in mind and another with a different set in mind?
  23. Super cool, vacation. : ) Curious, about that websocket, babylon node server, (examples or link)... How does that render out?
  24. oom1993

    moveToXY with socket.IO problem

    I managed to find the issue. I'n the socket IO segment i never initialized the bullet.ID object to an array like I did in the lower segment of code. Instead, I just immediately added an index. Initializing the object with an array seemed to fix it. Thanks
  25. Pryme8

    GUI 2d shapes

    ground2.renderingGroupId = 1; is needed.
  26. brianzinn

    GUI 2d shapes

    I do realize you said 2D, but here is a 3D that I was working on: Would be easy to make appear 2D just flatten out what's there. The interesting part of the code and what would fix your PG is here: let pivotMatrix = BABYLON.Matrix.Translation(progressBarLength, 0, 0); colouredProgressBar.setPivotMatrix(pivotMatrix); let preTransformMatrix = BABYLON.Matrix.Translation(progressBarLength / 2, 0, 0); colouredProgressBar.setPreTransformMatrix(preTransformMatrix); Here is your 2D playground perhaps more what you're after in 2D (scaling.x = % complete):
  27. oom1993

    moveToXY with socket.IO problem

    socket.on('bulletFromServ',function(bullet){ activeBullets[][bullet.num] = game.add.sprite(connectedSprites[].x - 8,connectedSprites[].y - 8, 'bulletSprite'); game.physics.arcade.enable(activeBullets[][bullet.num]); game.physics.arcade.moveToXY(activeBullets[][bullet.num], bullet.xDest, bullet.yDest, 300); }); Hi, i am having an issue with socket IO together with the moveToXY physics method. When the client receives the "bulletFromServ" message above. I try to initialize a sprite and then use the information sent with the bullet parameter to fill in the parameters of the moveToXY method. However, the sprites are created in the correct position but do not move at all. This snippet of code is within the create function but i have also tried using it in the update function with no luck. I use the moveToXY function in the below code which doesnt involve a socket call and it works fine. The snippet below also includes the emit to the server with the bullet details. Any ideas why the sprite is rendered but does not move to the position i specify with the moveToXY call? if(!firstFired){ activeBullets[] = [game.add.sprite(connectedSprites[].x - 8,connectedSprites[].y - 8, 'bulletSprite')] firstFired= true; }else{ activeBullets[].push(game.add.sprite(connectedSprites[].x - 8,connectedSprites[].y - 8, 'bulletSprite')); } activeBullets[][activeBullets[].length-1].checkWorldBounds = true; activeBullets[][activeBullets[].length-1].outOfBoundsKill = true; game.physics.arcade.enable(activeBullets[][activeBullets[].length-1]); game.physics.arcade.moveToXY(activeBullets[][activeBullets[].length-1], game.input.mousePointer.x, game.input.mousePointer.y, 300); socket.emit('bullet', {, x:activeBullets[][activeBullets[].length-1].x, y:activeBullets[][activeBullets[].length-1].y, xDest:game.input.mousePointer.x, yDest:game.input.mousePointer.y, num:activeBullets[].length-1 }); Thanks
  1. Load more activity