Herbert

Members
  • Content count

    80
  • Joined

  • Last visited

  1. @jerome oh, got it, you mean I can detect it and control it by myself, then I think getHeightAtCoordinates will be a useful function, but I expect imposter to do these works for me, so I will just go for PlaneImposter.
  2. @jerome what do you mean? you mean I can use getHeightAtCoordinates to resolve it? or you mean I can use groundMesh instead of a plane? it is groundMesh already just I named it plane
  3. @mr_pinc well...but that is a ground, it is weird to use a box to replace it, I think I'll ignore the warning and go for PlaneImposter
  4. hi @mr_pinc PlaneImposter works, but I got this warning(confused "Attention, PlaneImposter might not behave as you expect. Consider using BoxImposter instead"
  5. Hey guys I try to make a simple sport game, so first, I want to make a person stand on a ground who can run and jump on it, and I have trouble on the jump part, the dude won't stop by the ground when he is dropping from a height(https://www.babylonjs-playground.com/#1BZJVJ#113) if the position.y is 0, then the dude can stand fine on the ground
  6. ok, thank you~
  7. hi @Deltakosh I only find sourceXXX properties in GUI.Image. So perhaps I should create my own imageButton class based on GUI.Image. By the way, GUI seems only shows on the scene which is created LAST, not so sure if it is a bug? I borrow the PG in this post and make some changes to reproduce the issue(http://www.html5gamedevs.com/topic/15501-changing-scenes-locations/) here's the PG(http://www.babylonjs-playground.com/#1B3R9A#33) so I create a GUI button while scene 0 is being rendered(button not showing) then I switch to render scene 1 which is created later(the button is there)
  8. hi @jerome for the place I used it most is GUI, things like BABYLON.GUI.Button.CreateImageOnlyButton BABYLON.GUI.Image
  9. hi @aWeirdo thanks, but it's a bit different, I don't use it for animation, so in my case every frame's size is different, I just want to pack all the small images into one to save requests
  10. 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": } }
  11. I thought max version refers to latest version ok, I will try babylon.max. and I will try to reproduce it on PG, just wonder how I can switch scene on PG(since runRenderLoop is called outside)? "the render loop starts and ends with the same scene" => does that mean I have to call stopRenderLoop before I switch scene and start a new loop? var scene = createScene(engine); var scene2 = createScene(engine); var renderLoop = engine.runRenderLoop(function () { scene.render(); }); setTimeout(function() { engine.stopRenderLoop(renderLoop); engine.runRenderLoop(function () { scene2.render(); }); }, 2000);
  12. So it might happen when I try to switch the scene to be rendered. var scene = createScene(engine); var scene2 = createScene(engine); var sceneOption = [ scene, scene2 ]; var sceneIndex = 0; setTimeout(() => { sceneIndex = 1; }, 0); engine.runRenderLoop(function () { sceneOption[sceneIndex].render(); }); and it depends on the timing you switch the scene(e.g. maybe switch at 10ms is alright, but might go wrong at 11ms)
  13. Hi @RelativeNull This is already tested in the latest version(3.1 alpha) I recreate a simple project and everything goes well, so I think it only happens to a specific case. I will test around it, if I find something I will post it here. but i am also curios why does the speed become so slow in this PG example(https://www.babylonjs-playground.com/#DU4FPJ#3)
  14. putting it to sleep sounds good, thanks
  15. hi I try to use onBeforeStepObservable so I pass two more option to engine(http://doc.babylonjs.com/tutorials/animations#deterministic-lockstep) var engine = new BABYLON.Engine(canvas, true, { deterministicLockstep: true, lockstepMaxSteps: 4 }); and it occurs an error like below at scene.render() engine.runRenderLoop(() => { scene.render(); }); If I set the lockstepMaxSteps to 1, then it's alright. This issue seems not happen to the example on PG(https://www.babylonjs-playground.com/#DU4FPJ#3) any hint what could be the problem?