MOTAR
  • About
  • Welcome
    • Get a License
    • Installation & Tutorial Files
    • Commercial Installation & Setup Tutorial
      • Learn to Fly UFO - XR App Build Tutorial
        • Prerequisites
        • Install Sample Project
        • Set Up the Scenes
        • Set Up XR Controls
        • Configure the MOTAR SDK
        • Build the Application
      • Advanced Deployment Guide
      • Get MOTAR 3D
    • Government Installation & Setup Tutorial
      • Learn to Fly UFO - XR App Build Tutorial
        • Prerequisites
        • Install Sample Project
        • Set Up the Scenes
        • Set Up XR Controls
        • Configure the MOTAR SDK
        • Build the Application
      • Advanced Deployment Guide
      • Get MOTAR 3D
  • RELEASE NOTES
    • MOTAR 3.0
    • MOTAR 3.0 Beta Hotfix
    • MOTAR 3.0 (Beta)
  • HOW TO
    • MOTAR Core Services
      • Using MOTAR Hub
        • How to Discover Listings
        • How to Download Listings
        • How to Use the Model Inspector
        • How to View MIAB Compatible Listings
        • How to Use Version Tree in Hub
        • How to Launch Apps
      • Using MOTAR Studio
        • How to Manage Each Listing Type
          • App | Listing Type
          • Models | Listing Type
          • Video | Listing Type
          • Audio | Listing Type
          • Image | Listing Type
          • Document | Listing Type
        • How to Manage Listing Permissions
        • How to Use State Manager
        • About MOTAR Digital Thread
          • Digital Thread Iconology
          • New Version | Digital Thread
          • Remix | Digital Thread
          • Authorizing and Certifying Listings
        • MOTAR Secure File Upload & Scanning
      • Using MOTAR Devices
        • How to Sync a Device to MOTAR Web
      • Using MOTAR Admin On A Commercial License
        • Owning Company (Self Managed) | Commercial
        • How to Manage Partners | Commercial
          • How to Add Partners | Commercial
        • How to Manage Users | Commercial
          • How to Add Users | Commercial
          • How to Add User to Studio Group | Commercial
        • How to Manage Studio Groups | Commercial
          • How to Add Studio Groups
      • Using MOTAR Admin On A Government License
        • Owning Company (Self Managed) | Government
        • How to Manage Access | Government
          • How to Create A User | Government
          • How to Add User to Studio Group | Government
          • How to Manage Users | Government
        • How to Manage Studio Groups | Government
          • How to Add Studio Groups | Government
        • How to Manage Contractors | Government
          • How to Add Contractors | Government
      • Using MOTAR SDK
        • MOTAR SDK for Unity
          • Installation
            • Detailed Scoped Registry Instructions
          • Configuration
          • MOTAR Classes
          • Multiplayer - Normcore
      • Using MOTAR Holodeck
      • Installing and Using MOTAR 3D
      • Backup & Restore Data
      • Updating MOTAR Installation
  • Support
    • Contact Us!
Powered by GitBook
On this page
  • 1 - Getting Started
  • 2 - Project Setup
  • 3 - Configure the MOTAR SDK
  1. HOW TO
  2. MOTAR Core Services
  3. Using MOTAR SDK
  4. MOTAR SDK for Unity

Multiplayer - Normcore

PreviousMOTAR ClassesNextUsing MOTAR Holodeck

Last updated 20 hours ago

1 - Getting Started

The following guide was created using Unity 6.0.32 LTS, your editor views may differ. Normecore and MOTAR SDK are both compatible with Unity 2021LTS+.

This guide assumes you have a Unity project using the MOTAR SDK, our Avatar, and want to integrate Normcore multiplayer into your project. For more information on setting up your project with the MOTAR SDK for Unity, see MOTAR SDK for Unity

**Mac Users**

If the user is on a Mac device, please note that the silicon version does not support all plugins that are supported by the Intel version. It is recommended to download both the silicon and Intel Editors (only one version can be run at a time).

2 - Project Setup

1

Install the Normcore Package

Normcore is added with a Scoped Registry, similar to the MOTAR SDK

Install Normcore
  1. Open the Project Settings window and click on “Package Manager.”

  2. Inside the Package Manager tab, under “Scoped Registries”, click the plus button underneath MOTAR to add a new scoped registry.

  1. Add the following:

    • Name: Normal

    • URL:

    • Scope(s): com.normalvr

  1. Now let’s open the “Package Manager” window by clicking Window -> Package Manager from the top bar toolbar.

    1. Inside the Package Manager, click on “Normal” under “My Registries” on the left side of the window.

    2. Click on “Normcore” and click “Install”.

3 - Configure the MOTAR SDK

1

Configure your Avatar

The MOTAR SDK Avatar prefab (loaded with the Samples packages) can be configured to work as a Normcore avatar for multiplayer.

Configure Avatar Prefab
  • From the Project window, navigate to Assets -> Samples -> MOTAR SDK -> <current version> -> Avatar -> Resources.

  • Inside Resources double click on the prefab “MOTAR_Player.”

  • Inside the prefab click and drag the gameObject named “Avatar” into the Resources folder we just navigated to.

This will create a new prefab of just the Avatar’s mesh which we will use to spawn with Normcore.

  • Let’s rename the new prefab to “MOTAR_MultiplayerAvatar.”

  • Double click on the new prefab we just created

  • When prompted to save or discard our changes to “MOTAR_Player” click “Discard Changes".

2

Attach networking components

Now that we have our new prefab open we need to attach all the Normcore networking components.

Networking Components
  • With the root gameObject “MOTAR_MultiplayerAvatar” selected click on “Add Component” from the Inspector window.

  • Search for “Realtime View” and select it to add it.

  • Click on “Add Component” again and search for “Realtime Avatar” then select it to add it.

3

Assign Variables

Now that we have the components added, we need to assign the component variables.

Variables
  • From the Hierarchy window select and drag the gameObject labeled “Head” into the “Head” variable slot on the “Realtime Avatar” component.

  • Now do the same for the “Left Hand” and “Right Hand” variable slots by dragging the gameObjects labeled “Left Hand” and “Right Hand.”

  • Click on “Add Component” again and search for “Realtime Transform” then select it to add it.

Now let’s move onto the children gameObjects.

  • From the Hierarchy window select the gameObjects labeled “Head.”

  • Remove the current components attached because they’re no longer required.

    1. From the Inspector window click the three dots button on both the “Rigidbody” and “Parent Constraint” components and select “Remove Component.”

  • With the “Head” gameObject still selected click on “Add Component” in the inspector and search for “Realtime View” then select it to add it.

  • Click on “Add Component” again and search for “Realtime Transform” then select it to add it.

  • Now navigate to the child gameObject of the “Head” labeled “Avatar_FlatHead_1” and select it.

    1. We need to add back a Rigidbody component so that the Torso’s configurable joint can have a connection.

    2. With “Avatar_FlatHead_1” selected click on “Add Component” and search for “Rigidbody” then select it to add it.

    3. On the “Rigidbody” component check off “Use Gravity” and check on “Is Kinematic.”

  • Next navigate to the gameObject labeled “Torso.”

  • From the Inspector window, check off “Is Kinematic” on the Rigidbody component.

  • We need to fix the missing rigidbody on the first configurable joint.

    1. From the Hierarchy window, click and drag the gameObject labeled “Avatar_FlatHead_1” into the variable slot labeled “Connected Body” on the Configurable Joint component.

  • Next navigate to the gameObject labeled “Left Hand.”

  • We need to remove the current component parent constraint because it’s no longer required.

    1. From the Inspector window click the three dots button on the “Parent Constraint” components and select “Remove Component.”

  • Click on “Add Component” again and search for “Realtime Transform” then select it to add it. “Realtime View” will automatically be added.

  • Next navigate to the gameObject labeled “Right Hand.”

  • We need to remove the current component attached because it’s no longer required.

    1. From the Inspector window click the three dots button on the “Parent Constraint” components and select “Remove Component.”

  • Click on “Add Component” again and search for “Realtime Transform” then select it to add it. “Realtime View” will automatically be added.

  • That’s all the changes we need to make on this prefab. Click “Save” on the top right of the Scene window and exit the prefab.

Now, if you haven’t already, let’s open the scene you plan on using the avatar in.

  • From the Hierarchy window select the gameObject labeled “MOTAR_Player”.

  • If you don’t already have one in your scene, from the Project window navigate to Assets -> Samples -> MOTAR SDK -> 1.0.2 -> Avatar -> Resources and drag the prefab labeled “MOTAR_Player” into your scene.

  • Open the gameObject and navigate to the gameObject labeled “Avatar.”

  • Disable the gameObject by clicking the check box next to the name from the Inspector window.

4

Finish Line

Final Steps

Now we just have to set up our connection to the network.

  • With your scene open, click GameObject -> Create Empty from the top toolbar.

  • Rename the new gameObject to “Realtime” or whatever best suits your needs.

  • With the “Realtime” gameObject selected, from the Inspector window click on “Add Component” and search for “Realtime.”

  • Select it to add it to the gameObject.

    1. On the “Realtime” component rename the “Room Name” to something unique.

    2. You’ll need to acquire and add your Normal App Key to the “App Key” variable slot as well.

  • With the “Realtime” gameObject still selected click on “Add Component” in the inspector and search for “Realtime Avatar Manager” then select it to add it.

    1. From the Project window navigate to back to Assets -> Samples -> MOTAR SDK -> 1.0.2 -> Avatar -> Resources and drag the new avatar prefab we created labled “MOTAR_MultiplayerAvatar” into the “Local Avatar Prefab” variable slot on the “Realtime Avatar Manager” component.

  1. Now from the Hierarchy window find the “MOTAR_Player” gameObject we added earlier and drag it into the “Local Player: Root” variable slot on the “Realtime Avatar Manager” component.

  2. Twirl open the child gameObject labeled “Camera Offset” nested inside of “MOTAR_Player.”

  • Find the “Main Camera” gameObject and drag it into the “Local Player: Head” variable slot on the “Realtime Avatar Manager” component.

  • Now find the “Left Controller” gameObject and drag it into the “Local Player: Left Hand” variable slot on the “Realtime Avatar Manager” component.

  • Lastly, find the “Right Controller” gameObject and drag it into the “Local Player: Right Hand” variable slot on the “Realtime Avatar Manager” component.

  • Save your scene.

  • You’re now all set up and ready!

Additional setup is require for the Avatar hand animations and are not covered in this guide.

🔨
👨‍🔬
🖥️
📑
🏁
✅
🎉
🏁
https://normcore-registry.normcore.io
Cloned Avatar prefab
New Avatar prefab renamed
Discard changes popup
Remove both components
Kinematic off and Flathead added to Connected Body