Skip to content

Instantly share code, notes, and snippets.

@andijakl
Created August 8, 2019 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andijakl/ba4a7848b2edc3286df6dd2afb78f29e to your computer and use it in GitHub Desktop.
Save andijakl/ba4a7848b2edc3286df6dd2afb78f29e to your computer and use it in GitHub Desktop.
Subscribing to the event StartPlaceMode to enable the Augmented Reality placement mode functionality.
// Listen for the world event "StartPlaceWorld". This will be sent
// by another component in the scene when the placement mode should
// be active. When that event is received, this script sets placeMode to true,
// which actually allows this script to react to touch events.
this.startPlaceWorldEvent = ctx.world.event('StartPlaceWorld');
this.startPlaceWorldEvent.listen(ctx, data => this.placeMode.set(true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment