childMesh.getPhysicsImpostor is not a function

We have an app with a bit of physics in it, that has been working fine up until PhysicsPlugin refactor by CedricGuillemet · Pull Request #13279 · BabylonJS/Babylon.js · GitHub.

Specifically, it looks like the V1 of PhysicsEngineComponent does not get imported, unless explicitly done like so:

import "@babylonjs/core/Physics/physicsEngineComponent";
import "@babylonjs/core/Physics/v1/physicsEngineComponent";

Unless imported like this, when childMesh.getPhysicsImpostor wants to be called in Babylon.js/ammoJSPlugin.ts at master · BabylonJS/Babylon.js · GitHub it fails.

Is this breaking change expected? I was looking but couldn’t find any docs on the migration to the new physics thing, so given the back compatibility expectation stated in that PR, perhaps it is a bug?

It’s a bug. back compatibility should be preserved here.
I’ll do the fix.

1 Like

@jure can you please do a PG that shows the issue? I’ll use it to check that I properly fixed the issue.

1 Like

I believe I have found the cause.
Let me run a few tests, I hope to find a solution by tomorrow.

Any update on this topic? I’m playing the necromancer today :slight_smile:

who is that one message before you, and why haven’t he found a solution yet?

looking into that now. I remember understanding the issue, but I don’t remember why I haven’t fixed it. Sorry!

1 Like

I can’t seem to be able to reproduce that. it might have been fixed already?

If possible to share a project where it is happening I will be able to debug it better.

I think this is fixed.