Ammo Mesh Impostors For InstancedMesh Has Box Vertices

Yo @trevordev and @Deltakosh … I think there is a bug in the AmmoJsPlugin ._createShape

Whenever i use an InstancedMesh as the physics enabled object (ie. impostor.object is an InstancedMesh) with a Mesh Impostor.

I get the wrong vertices/triangles added… Its ends up as a BOX vertices and does not work. You can just pass right thru.

If I use a clone… its just fine

I can use basic shapes as a InstancedMesh just fine as well. It looks like the _addMeshVerts is not working right. I tried to step thru myself, but i cant see where its going wrong :frowning:

Pinging @Cedric

Hi @MackeyK24

Do you have a PG I can test with?

Sorry @Deltakosh and @Cedric … This was my bad… Im the culprit … Some code at the end of my function was creating a default box mesh collider… Sorry :slight_smile:

1 Like