Search
K
Links

Adding a Portal

To add a portal to your Metaspace using the Your Open Metaverse plugin, you can follow these steps:
Step 1: Creating a Custom Portal
  1. 1.
    Create a new Blueprint asset by right-clicking in a folder in the Content Browser and selecting "Create Basic Asset" > "Blueprint Class."
  2. 2.
    In the blueprint dialog box, search for "YomPortal" and select it.
  3. 3.
    Customize the portal as desired. If you want the plugin to automatically set the material, set "Details" > "Auto Set Portal Material" to true. The portal should have a StaticMeshComponent called "PortalDisplay" for automatic material editing. If you want to set the material manually, use the "Get Portal Material" node in the "Event On Portal Open" and "Event On Portal Close" events.
  4. 4.
    Add a collision component to trigger the portal behavior and set a default material under "Details" > "Materials" for when the portal is not connected.
Step 2: Adding the Portal to Your Level
Drag and drop the newly created portal from the Content Browser into your level.
Step 3: Adding a Button to Your Level
  1. 1.
    If you want to use the default button provided by Your Open Metaverse (YOM), you can use the "YomDefaultPortalButton" from the Content Browser. Skip to step 4 in that case.
  2. 2.
    To create a custom button, create a new Blueprint asset by right-clicking in a folder in the Content Browser and selecting "Create Basic Asset" > "Blueprint Class."
  3. 3.
    In the blueprint dialog box, select "Actor."
  4. 4.
    Open the blueprint and add a collision component (e.g., Box Collision).
  5. 5.
    Under "Details" > "Events" for the collision component, add an event for "On Component Begin Overlap."
  6. 6.
    In the event graph, add the necessary variables and set up the logic to open the portal when the player interacts with the button.
Step 4: Adding the Button to Your Level
Drag and drop the button from the Content Browser into your level.
Step 5: Opening the Portal
  1. 1.
    In the Outliner, find the button actor you placed in your level. In the Details panel of this actor, you'll find the "Portal" and "Url" variables you created.
  2. 2.
    Set the portal variable to the portal you added in step 2.
  3. 3.
    Set the URL of the portal to a valid URL pointing to another metaspace.
If you want to keep the portal open at all times, you can call the "Open Yom Portal" function with a delay that matches the duration the portal should remain open. Make sure to run this on the owning client to ensure the correct YomPlayer is used.