Error on adding model as collision mesh

I can’t run play mode

abort(“OOM”). Build with -s ASSERTIONS=1 for more info.

I added to collision mesh the model of the ‘city’
it works but with not added asset model just only collision of type mesh

Hi @grzesiekmq,

Have you imported Ammo to your project?

Are you able to share a project url to take a look?

the scene

the c1 model is loaded at runtime and enabled

I don’t think this model can work with Ammo.js and in general it would be very slow to impossible to render with a decent frame rate. You have try to drastically reduce the polycount and the number of mesh instances used:


Holy moly. Yeah, chances are that’s far too many polys to create a collision mesh out of at 181MB

1 Like


I am doing now similar to this above but I disabled the collision mesh from c1 model and added two entities c1_ra and c1_rb with collsion meshes and I cant run the game the same error
but 30 minutes ago it worked so I dont know what change makes this issue
the ra is related with road and rb too

this scene

@grzesiekmq, how many polygons is your scene in total?

The launch window is loading and loading, 200MB++.

Your c1_ra and c1_rb are 700K polygons each, this is still way too much for doing physics/collisions. You have to drastically reduce your polycount.

1 Like

but it worked I tested and drive the car around

Well, given how much the editor lags and how long it takes for the launch window to load, I would say you got lucky.

What is your deployment target? I don’t see many desktop computers being able to run this app at the current state.

It’s way too many. Honestly speaking, if you need to have this level of fidelity and high polycounts, publishing on the web isn’t really the best platform.

@grzesiekmq and I were looking to build the game on Playcanvas since its the engine we know best. I’d eventually like to use to convert it into an executable. The site has worked for me before.

The only reason we used this model was because we needed a true to life model and tools like open street map aren’t satisfactory. Is there absolutely no solution for this?

I would treat it as open world game where you would load/unload chunks of the city at a time. The collision mesh would have to be hand done so it’s as low poly as possible.

Truthfully, if your target platform is desktop then I would go with Unity or similar as you will have more headroom to handle and edit larger meshes like this. You can still run into the same problems though and will need the same solution.

Thanks for the reply @yaustar. @grzesiekmq and I are looking into this.

there sth wrong with c1_ra
because when I disable c1_ra entity then I can launch the game