Jump to content

Search the Community

Showing results for tags 'compound imposter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi Babylon.js forum, I've been particularly setback by a problem I haven't been able to solve for the last day. I have created a stage in Blender, exported it to Babylon. I had two objects I wanted to create a compound imposter and I found createCompoundImpostor() at this site: http://blogs.msdn.com/b/eternalcoding/archive/2013/12/19/create-wonderful-interactive-games-for-the-web-using-webgl-and-a-physics-engine-babylon-js-amp-cannon-js.aspx. It says you have to create a hierarchy so I did, using .parent... except it squashed one of the meshes. I wondered if this was something in my export so I started a new test project in Blender and yet it still squashes a mesh, in particular it squashes the child mesh! Here is a section of my test code var pushers = { pusher: null, rod: null};var loaded = false;BABYLON.SceneLoader.ImportMesh("", "", "Stage-Test-4-TEST001.babylon", scene, function (meshes) { meshes.forEach(function (mesh) { if (mesh.id === "Slider_Pusher") { pushers.pusher = mesh; } else if (mesh.id === "Slider_Test") { pushers.rod = mesh; } }); pushers.rod.parent = pushers.pusher; var parts = [ { mesh: pushers.pusher, impostor: BABYLON.PhysicsEngine.BoxImpostor }, { mesh: pushers.rod, impostor: BABYLON.PhysicsEngine.BoxImpostor } ] scene.createCompoundImpostor(parts, { mass: 1, friction: 0.1, restitution: 0.1 }); loaded = true;});And here are two screenshots, first from Blender and then from my browser (Ignore the missing faces in pushers.pusher, that's just a stupid problem I encountered making this setup even though all the normals are consistent in Blender) I just cannot figure out what's going on, the only documentation on the entire Internet on this feature is the 2 lines, 1 quoted line and few lines of code from that page! I'm using Oimo.js but in cannon.js it did the same thing. Is this a library bug or am I just doing it completely wrong? Does anyone have any working examples they could share? I'm in despair and losing faith!! Haha! Cheers guys.
×
×
  • Create New...