• Content count

  • Joined

  • Last visited

About ian

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender

Recent Profile Visitors

2,168 profile views
  1. Level 20 And level19
  2. @RaananW RaananW is there any playground showcase for learning to see how works sleep and wakeUp ? Greetings Ian
  3. just find some problem... babylon.js:3 Mixed Content: The page at 'https://..................' was loaded over HTTPS, but requested an insecure script 'http://www.babylonjs.com/babylon.inspector.bundle.js'. This request has been blocked; the content must be served over HTTPS. Just find some problem. (Mybe in future try host http://www.babylonjs.com/babylon.inspector.bundle.js also with https https://www.babylonjs.com/babylon.inspector.bundle.js).. WHIT NO SELF SIGN CERT !!! (MAYBE WITH Let's Encrypt Authority X3) https://support.google.com/chrome/answer/1342714?p=unauthenticated&visit_id=0-636270794018128874-3129128722&rd=1 Gretings Ian
  4. sometimes you must think (phone first aligment .. than tablet than bigger devices..)
  5. No I use % and test around diff devices
  6. Manage different sreen-sizes out in the world. I use arc camera and zoomin zoomout of camera. Maybe is that what you asking.
  7. ? I don't understand what are you asking?
  8. Showcase of playing Perplexus Shadow Open 3D maze game on android phone Nexus 5x (it works also on tablet) Game works smooth! BabylonJS is great game engine for phone games! Here is Video (recorded with android app "AZ Screen Recorder") https://gaming.youtube.com/watch?v=vB7hd_SAzOA
  9. RannanW, I and my friend solve this problem. Now colliders(box-impostors) are as child of model. Model and colliders are rotating as expected! So physics works as charm (perfect). I have 470 box colliders and everythink work fine (reliable working physics collision): And performance are fine too. Soon I'll show when I finsih upgrade of game (almost finish I am trying also to make custom camera aligment... - alternative). RannaW thank you for your post (Il save it) Maybe someday I'll try something like that sleep and wakUp.. greetings Ian
  10. Just one notice. Can you add to view where are physics impostors/colliders? Or is this already in inspector? RaananW did something like that (maybe is another/better way but this is sometime good/handy to se where are coliders) // add this in render loop bodyViewer.update(); // ----------------------- // and this two functions // -------------------------- function PhysicsImposterViewer(physicsPlugin, scene) { this.bodies = physicsPlugin.world.bodies; this.meshes = []; this.boxMesh = BABYLON.MeshBuilder.CreateBox('physicsBodyBoxViewMesh', { size: 1 }, scene); scene.removeMesh(this.boxMesh); this.boxMesh.rotationQuaternion = BABYLON.Quaternion.Identity(); this.sphereMesh = BABYLON.MeshBuilder.CreateSphere('physicsBodySphereViewMesh', { diameter: 1 }, scene); scene.removeMesh(this.sphereMesh); this.sphereMesh.rotationQuaternion = BABYLON.Quaternion.Identity(); var mat = new BABYLON.StandardMaterial('', scene); mat.wireframe = true; this.boxMesh.material = mat; this.sphereMesh.material = mat; for (var i = 0; i < this.bodies.length; i++){ var body = this.bodies[i]; var shape = body.shapes[0]; var mesh; if (shape.halfExtents) { mesh = this.boxMesh.createInstance('physicsBodyView' + i); mesh.scaling.x = shape.halfExtents.x * 2; mesh.scaling.y = shape.halfExtents.y * 2; mesh.scaling.z = shape.halfExtents.z * 2; } else if(shape.boundingSphereRadius){ mesh = this.sphereMesh.createInstance('physicsBodyView' + i); mesh.scaling.x = shape.boundingSphereRadius * 2; mesh.scaling.y = shape.boundingSphereRadius * 2; mesh.scaling.z = shape.boundingSphereRadius * 2; } this.meshes[i] = mesh; } } PhysicsImposterViewer.prototype.update = function () { for (var i = 0; i < this.bodies.length; i++){ var body = this.bodies[i]; var mesh = this.meshes[i]; if (mesh) { mesh.position.x = body.position.x; mesh.position.y = body.position.y; mesh.position.z = body.position.z; mesh.rotationQuaternion.x = body.quaternion.x; mesh.rotationQuaternion.y = body.quaternion.y; mesh.rotationQuaternion.z = body.quaternion.z; mesh.rotationQuaternion.w = body.quaternion.w; } } }
  11. we are trying to do some example with parent-child box colliders. I'll report if this will work. greetings Ian
  12. Davrous. If we have model and box impostors (cubes) around model. And if box-impostors (cubes) are child of model. If we rotate/move model Does box-impstors rotate as model or not. If not how can we achieve that? Is there any example?
  13. Rannan is possible to enable/disable box physics colliders at runtime(render or physics time)? Is possible to rotate phsycs box colliders/impostors and enable only those which happen enter-intersection between ball/sphere and boxes(which are intended for box impostors/colliders). or If we initialize all cubes as box impostors and if cubes are child of perplexus. Does box impostors rotate/move if we rotate perplexus or are those box impostors static? Is possible to achieve anything like that??? Rannan what is your opinion to achieve that and what do you think about performance impact? @Deltakosh @RaananW
  14. if ( newMesheI.id.substring(0, 4) == "Cube") { colliders.push( newMesheI ); newMesheI.physicsImpostor = new BABYLON.PhysicsImpostor( newMesheI, BABYLON.PhysicsImpostor.BoxImpostor, { mass : 0, friction : 1, restitution : 0 }, scene); } As I can see you add physicsImpostor at the beginning. (If you do same on my complex example. you will see that BoxImpostor(physics) are static and are not moving. No I would like that BoxImpostors are moving. I don't want static BoxImpostors. 1.alternative Or I want to activate only those BoxImpostors which are enter-intersection with playBall and deactivate those BoxImpostors exit-which are intersection. 2.alternative Or If we imagine PlayBall with radius 1. and Virtual_PlayBall->(as child of PlayBall) with radius 5. If we calculate intersection-faces of Perplexus with Virtual_PlayBall at each frame/physics_steep. I would like that physics-collision will work/calculate only between PlayBall and intersection-faces of Perplexus. .................... Maybe I am asking stupid question. What I would like to achieve is that collision between perplexus and playball will calculate only around some virtual-sphere(this virtual-sphere is child of playBall) area ( or specific example around radius 5 around virtual-sphere). I want that perplexus can have "unlimited/lot of" number of vetices. If I understand correct if we have for example to big perplexus model the mesh collision is not reliable any more. Is possible to custom MeshImpostor/Mesh_collision. To add some parameter(virtual_sphere_area) and that collision between ball and mesh will calculate only intersection faces of mesh and virtual_sphere_area and playball.
  15. Hi @Deltakosh @RaananW I prepared two playground (simple and complex(with WSAD rotation) Deltakosh as you suggest. I put first on loading all Cube... meshes/boxes in colliders array. Than I sey for each colliders as parent of perplexus mesh. Than I add on each box-mesh-collider (from colliders array) OnIntersectionEnterTrigger and OnIntersectionExitTrigger. Here I add physicsImpostor.BoxImpostor on each box IF playball and specific box OnIntersectionEnterTrigger happend. And I remove physicsImpostor.BoxImpostor from specific box in colliders object if OnIntersectionExitTrigger happend. (F12 console shows ok ..) BUT playball mesh/sphere fall through. Am I missing anything? Or Am I doing anything incorrect? Any help? I add also console.log you can see that playBall mesh/sphere fall over simple example http://www.babylonjs-playground.com/#1U2VMI#0 ... if ( newMesheI.id.substring(0, 4) == "Cube") { colliders.push( newMesheI ); } .... .... for (var a=0; a<colliders.length; a++) { colliders[a].parent = perplexus; colliders[a].rotationQuaternion = new BABYLON.Quaternion(); colliders[a].isVisible = true; } // end for set up all colliders for (var a=0; a<colliders.length; a++) { colliders[a].actionManager = new BABYLON.ActionManager(scene); colliders[a].actionManager.registerAction( new BABYLON.ExecuteCodeAction( { trigger: BABYLON.ActionManager.OnIntersectionEnterTrigger, parameter: { mesh:playBall, usePreciseIntersection: true} }, function(evt) { console.log("onIntersectioneEnterTrigger BEGIN"); console.log("Object ID - intersection = "+evt.source.id); console.log("Object ID - begin physicsImpostor = "+evt.source.physicsImpostor); evt.source.checkCollisions = true; if ( evt.source.physicsImpostor == undefined ) { evt.source.physicsImpostor = new BABYLON.PhysicsImpostor( evt.source, BABYLON.PhysicsImpostor.BoxImpostor, { mass : 0, friction : 1, restitution : 0 }, scene); console.log("Object ID - end physicsImpostor = "+evt.source.physicsImpostor); console.log("onIntersectioneEnterTrigger END"); } }) ); colliders[a].actionManager.registerAction( new BABYLON.ExecuteCodeAction( { trigger: BABYLON.ActionManager.OnIntersectionExitTrigger, parameter: { mesh:playBall, usePreciseIntersection: true} }, function(evt) { console.log("onIntersectionExitTriger BEGIN"); console.log("Object ID - intersection = "+evt.source.id); console.log("Object ID - begin physicsImpostor = "+evt.source.physicsImpostor); evt.source.checkCollisions = false; if ( evt.source.physicsImpostor != undefined ) { evt.source.physicsImpostor = undefined; } }) ); } // end set up enter end exit triggers/listeners on all Cube boxes (adding impostor and removeing impostors) complex example (this playground has more code camera is focusing on ball and you can rotate model with WSAD but ball fall over....) http://www.babylonjs-playground.com/#VZM8J#0 Greetings, Ian