Learn how to use Positional Anchors in a scene
About Positional Anchors
Positional Anchors represent a position in the scene.
You can attach a Positional Anchor to a screen message, a sound, a 3D asset, and more. You can also use them with World Proximity Conditions to know if a user has moved to a certain spot in the VR simulation.
These anchors are customizable as you can create and determine a custom position within the scene either manually or using the VR Editor.
Other Types of Anchors
Named Anchor (Catalog Type): Anchor that exists inside the APK (predetermined) and not configurable. Scene Anchors are found here.
Scene Anchor Resource: The Scene Anchor Resource attaches an anchor to a scene object. Anchors represent a position in the scene. This anchor can be used by other resources, such as the Screen Message and Move User resources.
Unlike the Positional Anchor resource, the Scene Anchor resource simply attaches to a scene object within the scene. Its position cannot be configured.
UI Anchor Resource: The UI Anchor Resource attaches an anchor to an object in the scene. Anchors represent a position in the scene. This anchor should be used by UI resources, such as Screen Message or Annotation.
Compared to other anchor resources, this resource provides additional optional fields that can enhance the user interaction experience with UI panels.
Creating Positional Anchors
Follow these steps to create your own, custom Positional Anchor:
- Open a project in StoryFlow.
- Go to your anchor catalog within the catalog area and open the Named Positional Anchors folder (or create one if it doesn't exist).
- Create a new anchor:
- Save your changes in StoryFlow.
Setting the Position of your Positional Anchors
There are two different position types:
- Fixed Position
- Relative Position
The Fixed Position setting allows the author to configure the coordinates of the Positional Anchor, as well as its rotation.
The Relative Position setting allows the author to configure the angle, distance, and elevation of the Positional Anchor, as well as its rotation.
Another great resource is the VR Editor. Using this feature, you are able to place the positional anchor in the scene within the headset. For full instructions, click here.
Example: Playing Media at Positional Anchor
Let's say I want to add a video at a certain point in the scene in a particular location. I'll use the positional anchor to place the video exactly where I want. I've previously used the VR Editor to create a custom location.
- Open the appropriate script and go to the area where your scene objects are.
- Use the catalog icon on the far right to find your positional anchor.
- Drag the anchor to the script and save:
- Open the frame where you want to put the resource. In this example, I want to add a video at the end.
- Add the appropriate resource for the content and select your custom anchor:
- Test in the headset:
Example: Using World Proximity Conditions with Positional Anchor
The World Object Proximity Condition is met when the user is within range of the specified world objects. In this example, I want a screen message to appear once the learner moves to a certain location that I've determined with my "Anchor 2".
- Using the VR Editor, I've placed my "Anchor 2" in front of the paint cans in my Workshop:
- In my script, I've added the World Proximity Condition to the desired frame. In this case, it has become a compound condition (two or more conditions) because I want this to trigger when the last notification has been closed by the learner AND they come within the *range I've specified of my "Anchor 2":
*distance in metres.
- I've added a screen message and a notification sound to play once the learner is in the correct spot:
- When I test in the headset, you can see that the resources play once the conditions above are met: