Tomm Huth Posted November 14, 2018 Share Posted November 14, 2018 I tried locally using updraft where it does work, however I cannot use getData, as cylinder is null, and the console logges out "Uncaught TypeError: Cannot read property 'dispose' of undefined"). When I try to recreate it in the playground, nothing works: see https://playground.babylonjs.com/indexStable.html#JTDQ4I Bug? Quote Link to comment Share on other sites More sharing options...
ssaket Posted November 15, 2018 Share Posted November 15, 2018 Nope.The PG is missing physicsImpostor. Not sure what you are trying to achieve, so I added ground imposter - https://playground.babylonjs.com/indexStable.html#JTDQ4I#1 Quote Link to comment Share on other sites More sharing options...
Tomm Huth Posted November 15, 2018 Author Share Posted November 15, 2018 Is a ground impostor required in the scene to make updraft work? Also what could a ground impostor in the scene have to do with getting debug data for the helper? The docs mention nothing of this as far as I can tell. Also, the getData stil does not work even with your ground impostor: https://playground.babylonjs.com/indexStable.html#JTDQ4I#2 Quote Link to comment Share on other sites More sharing options...
ssaket Posted November 15, 2018 Share Posted November 15, 2018 No, but there has to be at least one imposter in the scene because of it's definition - e.prototype.updraft = function(e, t, i, r, n) { if (void 0 === n && (n = a.Center), !this._physicsEngine) return f.Tools.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."), null; if (0 === this._physicsEngine.getImpostors().length) return null; var o = new s(this._scene,e,t,i,r,n); return o.dispose(!1), o } Imposters basically allows interaction between the physics engine and the objects. May be someone can explain it better. The getData was not working because the imposter had 0 mass, here have a look - https://playground.babylonjs.com/indexStable.html#JTDQ4I#3 Tomm Huth 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted November 15, 2018 Share Posted November 15, 2018 I modified the helper to be more resilient Thanks a lot @ssaket for the help! (again ;)) Tomm Huth and ssaket 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.