PhysicsViewer working only with MeshImposter

Hi everyone,

(here a playground for the example)

I was wondering why my physicsViewer isn’t working when i use this line :

sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.SphereImpostor, { mass: 0 }, scene);

having this result :
Screenshot_14

but when i use this :

sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.MeshImpostor, { mass: 0 }, scene);

I have this result :

I’m sure it’s something really stupid, but i didn’t figure out why :confused: .

Thanks everyone !

Hey there! Thank you for this example, this was actually a bug in the OimoJS plugin :slight_smile: PR is up with a fix: [Physics] Fix OimoJS plugin syncMeshWithImpostor method. by carolhmj · Pull Request #12442 · BabylonJS/Babylon.js (github.com)

1 Like

Ah, and just as a PS, I saw you’re setting mesh.alpha in your example, but that won’t work as alpha is a property of the material, not the mesh :slight_smile: if you want to set alpha, you’ll have to create a material for that mesh and set the alpha there