Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Attach the AR Anchor component to the entity in Amazon Sumerian
// Attach AR anchor component to entity
// -------------------------------------------------------------------
// First, create the anchor component that is actually attached
// to the entity.
const arAnchorComponent = new si.ArAnchorComponent();
// To work with this component, we also need the internal entity
// that extends the 'normal' entity and provides additional functionality.
this.internalAnchorEntity = si.Entity.forPublicEntity(this.anchorEntity);
// The internal entity allows us to add an additional component
// to its definition - in this case, the ArAnchorComponent we
// just created.
this.internalAnchorEntity.setComponent(arAnchorComponent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.