Clarification on Keeping VPS Models Visible in Studio

You’re correct — by default, VPS locations will show their children when tracked and hide them when tracking is lost. To override this, you’ll need a custom component. Here’s a starting point:

world.events.addListener(world.events.globalId, 'reality.locationfound', (e: any) => {
  const {name, position, rotation} = e.data
  if (name === component.schema.locationName) {
    // if location is found, remove the entity and its children
    ecs.Hidden.remove(world, component.eid)
    // update the position and rotation each found event
    ecs.Position.set(world, component.eid, position)
    ecs.Quaternion.set(world, component.eid, rotation)
  }
})

The key is to move your AR content outside of the VPS location in the hierarchy (so it’s not a child of the location entity) and attach this custom component to a new empty parent entity.

1 Like