• Content count

  • Joined

  • Last visited

About TomaszFurca

  • Rank
    Advanced Member

Recent Profile Visitors

497 profile views
  1. Best way to create tooltip

    Hi, yesterday i was start develop gui tooltips. Tooltips are show using events onPointerEnterObservable and onPointerOutObservable. Now I try to set container above base control (for example button). Creating tooltips as parent of button I can't make my tooltip bigger than parent -> I think good way is creating tooltips as parent of main stack panel, but i have problem with absolute position of tooltip. It is shown below button, I can create tooltip before button and then it show above button, but then position of button has been changed. Tom
  2. I prefer to do that like this: <?php $jsval = json_encode('PHP Value'); ?> var jsval = '<?php echo $jsval;?>'; I think about ' ' between php code in js, because in case of null value of php variable js will terminate due to syntax error;
  3. SPS and skeleton animation

    I create my field of grain using instances, but perfomance would be better using SPS, but I cannot do that using SPS. let grain =['nature_grain'].createInstance('Grain', true); grain.scaling = new BABYLON.Vector3(1.3,1.3,1.3); grain.position = new BABYLON.Vector3(22.32,0,-103.46); grain.skeleton.beginAnimation('ArmatureAction', true); for (let i = 0; i < 1000; i++) { let offsetX = (Math.random() - 0.5) * 60; let offsetZ = (Math.random() - 0.5) * 10; let instance = grain.createInstance("instance" + i); instance.parent = grain; instance.skeleton = grain.skeleton; instance.position.x = offsetX; instance.position.z = offsetZ; } Effect like this:
  4. SPS and skeleton animation

    So, using SPS i cannot run skeleton animation, because all meshes are one big mesh. Today i try to make my animation using another method. I will write new post in this topic. Thanks for help.
  5. SPS and skeleton animation

    Hi, I try to run animation of skeleton on my SPS, but i don't work. Simple code: let SPS = new BABYLON.SolidParticleSystem("SPS", scene); SPS.addShape(meshP, 50); let mesh = SPS.buildMesh(); mesh.material = meshP.material; mesh.skeleton = meshP.skeleton.clone("clonedSkeleton2"); SPS.afterUpdateParticles = function(start, stop, update) { mesh.skeleton.beginAnimation('Skill01', true); } SPS.initParticles(); SPS.setParticles(); Thanks for help Tom
  6. Scene dispose freeze BJS

    Next problem - when i want dispose scene in intersectionEnter event in action manager i got error. Check it on PG:
  7. Scene dispose freeze BJS

    On PG i cannot replace this problem, so i start to debug source code of BJS and found problem there: Scene.prototype.disposeSounds = function () { this.mainSoundTrack.dispose(); /// This line of code freeze my TAB ... }; In my project I register some empty BABYLON.Sound (without file) and then scene cannot be disposed. After remove empty BABYLON.Sound it works!
  8. Scene dispose freeze BJS

    Open my game And go your player to fireplace (there is pinned event to change scene) and then window with game will be frozen. I don't know how can i debug it.
  9. Scene dispose freeze BJS

    Hey, I start work with many scenes, but i have problem with dispose inactive scenes, after call scene.dispose() or engine.dispose() bjs freeze chrome TAB. How i can successful delete scene with all meshes, actions etc?
  10. Slavs - slavian rpg game

    Check new version of preview: - character select - New lights - character select - new sounds Live:
  11. Good tips. Already changed looping my colliders array in scene after render function to action manager, because action manager is fired only when object intersect, so i do need to check all colliders in camera frumstrum. Next good point to optimize my game. Also I fixed PG You need to set parameter in action manager. Parameter value is mesh with which you want register function.
  12. Hi, I think the best option would be use intersect with mesh ->
  13. Hi, after finish inventory GUI in my game - I have small problem with mesh rotation after mount item to bone. For reproduce problem open my game, open inventory and click to any sword to change, then mounted item has wrong rotation. its my code to mount item: mesh.attachToBone(bone, meshCharacter); mesh.position = new BABYLON.Vector3(0, 0, 0); bone.getRotationToRef(BABYLON.Space.WORLD, meshCharacter, mesh.rotation); mesh.rotation = mesh.rotation.negate(); mesh.rotation.z = -mesh.rotation.z; Variable mesh is item to equip. Thanks for help, Tom.
  14. Intersect and Frumstrum

    Thanks for replay, but what you think about this scenario. Player - have register function in render loop too check collisions with colliders (this is array of all meshes in scene, which are colliders for player). In loop are meshes, which we don't see on camera.
  15. Intersect and Frumstrum

    Hi, in my project i have a lot modules which must register anonymous function in sceneAfterRender. Some of them uses intersectsMesh. What you think about check mesh is active, before check intersects? For example checking player collisions, with only colliders, which are visible in camera: for (var i = 0; i < colliders.length; i++) { var mesh = game.sceneManager.environment.colliders[i]; if(scene.isActiveMesh(mesh)) { if (this.mesh.intersectsMesh(sceneMesh, false)) { ... } } } Tomasz Furca