Spawned Mesh Is Invisible Unless Dimensions Are Not 1,1,1


#1

I’m running into a peculiar issue with one mesh. If I spawn it in with dimensions of 1,1,1 I can’t see it. If I select it from the list in the create menu I can grab its “gizmo” and with just a little nudge, it appears. Additionally, if I spawn in the objects with different dimensions such as 2,2,2 or 2,1,2 it appears just fine. For the time being, I’m simply scaling the object (as it’s meant to be scalable anyway), but it would be nice to find out what is going on, as well as allowing others using this entity to scale it to 1,1,1 if they would like to.

For reference, here is how I am spawning it in:

var ENTITY_SCALE = 2; // Setting this to 1 will result in the “missing object”

Entities.addEntity({
position: Vec3.sum(ENTITY_LOCATION, {x: 0, y: 0, z: 0, w: 0}),
script: Script.resolvePath(“entityScript.js”),
type: “Model”,
modelURL: ENTITY_MESH_URL,
shapeType: “box”,
dimensions: {x: 1 * ENTITY_SCALE, y: 1 * ENTITY_SCALE, z: 1 * ENTITY_SCALE}, // This is set up to scale the object. Simply setting it to 1,1,1 also results in the spooky “missing object phenomon”
collisionless: false,
“userData”: JSON.stringify(userData)
});