After cloning or generating a new Entity, the model is missing data

Here’s an interesting one. I was trying to generate an entity with a model using scripts. What would happen is the model asset would not load properly. It would load the “top face” but the rest of the model would be missing. I’m using an FBX exporting from 3DS max. The model works perfectly when loaded via the editor. So I decided to instead use templating and have the objects in the scene and just clone them. Same problem. Please see picture.

In img 1 you can see the model added via the editor vs the model added via clone.
In img 2 it is the same thing but I am picking up the cloned model.

For some reason only the top polygons are visible when it is cloned… What the heck could be wrong? It’s the same with the collision mesh, it’s only using the top polygons. I thought maybe it was a scaling issue (as if its squashing the model) but that doesn’t make any sense…

Also I find after cloning if I don’t do

entity.setLocalScale(1, 1, 1);

It doesn’t spawn at all where I tell it to.

Do you have a link to the project?

https://playcanvas.com/project/519115/overview/battle-runes-of-the-viking-gods

To test click PLay, do Adventure Mode, level 2 - the cloned object will be on top (or under idk) the highlighted object in the scene. You can click and drag to move it.

The code that is called is in game/scripts/rune.js under Rune.factory

I found the problem…!

I was adding the object as a child to another object whose height was set to 0.075. I had no idea that would affect the child object!