• This repository has been archived on 31/Oct/2023
  • Stars
    star
    310
  • Rank 134,926 (Top 3 %)
  • Language
    C#
  • License
    Other
  • Created over 7 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is a networked physics sample for Rift built in Unity.

Networked Physics in Virtual Reality: Unity Sample

Welcome to the Oculus Rift networked physics in VR sample!

General controls:

Grip button         = grab, release cube
Index button        = snap cube to hand
Stick up/down       = move held cube in/out
Stick left/right    = rotate held cube

There are three scenes in the Unity project:

1. Loopback
2. Host
3. Guest

To run the networked physics demo, open up unity and select the "Loopback" scene in the "Scenes" folder. This is the best place to start.

The loopback scene simulates a network connection between a host and a guest in one application. The host is the initial set of cubes you spawn in front of. The guest is the set of cubes to the right. Actions you make in either simulation are mirrored to the other via a virtual network. You can switch between host context (cubes turn blue when you interact with them), to the guest context (cubes red when you interact with them) by pressing "A" and "B" buttons on your touch controller. Press "SPACE" to reset the simulation.

Next, you can run a host and guest. The host acts as a server that up to three other players can connect to. Guests use the Oculus Platform SDK matchmaker to find a host to connect to. Pressing "SPACE" as host resets the simulation. Guests pressing "SPACE" disconnect from the current game and go back to matchmaking to find a new host (if there is only one host running, guests will simply reconnect).

A "Build" menu has been added to the Unity menu so you can easily create standalone builds. Builds are created in the "Builds" directory under the Unity project. You can build Loopback.exe, Host.exe and Guest.exe, corresponding to each scene in the Unity project.

If you want to restrict play between yourself and friends, edit the "Version" string in Constants.cs and set it to some unique phrase before making builds. The host and guest will only matchmake with players that have the same version string.

License

The sample in Assets/Scripts is licensed under the BSD License with an additional grant of patent rights except as otherwise noted.

The Oculus SDK, Platform, and Avatar components are licensed under the Oculus SDK License.

Enjoy!

Glenn Fiedler [email protected]

More Repositories

1

f8app

Source code of the official F8 app of 2017, powered by React Native and other Facebook open source projects.
JavaScript
13,987
star
2

messenger-platform-samples

Messenger Platform samples for sending and receiving messages. Walk through the Get Started with this code. https://developers.facebook.com/docs/messenger-platform/quickstart
JavaScript
1,717
star
3

360-video-player-for-android

Sample code for creating a 360 video player on Android. Creates an OpenGL ES scene that renders a sphere textured with video frames from MediaPlayer playback. Does not use the NDK. This is a simple example of the core elements of 360 video rendering and is not intended to be production quality code. The code may be unstable. This is won't be maintained.
Java
616
star
4

messenger-bot-samples

Messenger Bot Samples
JavaScript
554
star
5

Canvas-Streaming-Example

This project contains example code showing how to go live on Facebook using a <canvas> element as a source.
JavaScript
340
star
6

audience-network

Open source projects to demonstrate SDK and sample code usages and integration, and to collaborate and support peers in this community.
319
star
7

WhatsApp-Business-API-Postman-Collection

A Postman collection that contains the full set of sample WhatsApp Business API calls.
294
star
8

fbinstant-samples

Sample projects for the Facebook Instant Games platform
JavaScript
256
star
9

graph-api-webhooks-samples

These are sample clients for Facebook's Graph API Webhooks and Instagram's Real-time Photo Updates API.
CoffeeScript
236
star
10

whatsapp-api-examples

Examples of how to use WhatsApp Cloud API on the WhatsApp Business Platform
JavaScript
203
star
11

original-coast-clothing

Sample Messenger App - Original Coast Clothing
JavaScript
202
star
12

fbctf-2019-challenges

The challenge source code and solutions for FBCTF 2019
Python
200
star
13

threads_api

This repository contains a sample app for developers who are interested in integrating with the Threads API.
JavaScript
187
star
14

workplace-platform-samples

Sample code to enable Workplace customers to make the most of the features of the Workplace Custom Integrations platform.
PowerShell
183
star
15

ghc-hotswap

Example code for how we swap compiled code within a running Haskell process.
Haskell
172
star
16

kotlin_ast_tools

Utilities and examples used in Meta to simplify migration from Java to Kotlin and maintenance of Kotlin code.
Kotlin
149
star
17

fblogin-sample

Sample implementations for developers to take as reference when building into fb login products.https//developers.facebook.com/docs/facebook-login/messenger-integration
JavaScript
120
star
18

sculpting-and-simulations-sample

Sample code that supplements the Sculpting And Simulations talk.
C++
96
star
19

live-comments-teleprompter

Example code shows how to retrieve comments and reactions for a Facebook Live video.
JavaScript
89
star
20

bucksamples

Samples for the Buck build tool.
Objective-C
72
star
21

original-coast-clothing-ig

Sample Instagram App - Original Coast Clothing
JavaScript
51
star
22

glTF-Renderer

Sample glTF Renderer for Android
Java
50
star
23

marketing-api-samples

Solution samples using the Facebook marketing API.
JavaScript
49
star
24

reels_publishing_apis

This repository contains sample apps for developers who are interested in integrating with Reels APIs.
JavaScript
41
star
25

OpenNetNorad

Sample system to manage Uping and Upong (UdpPinger) instances, used to measure / graph network latency and loss on Linux
Python
38
star
26

VRDeepLinkSDK

VRDeepLinkSDK provides a quick way to integrate your app to display a 360 photo/video content from Facebook.
Java
37
star
27

android-native-library-merging-demo

Buck demo showing how to safely merge native libraries in Android apps.
C
36
star
28

sdstudio

sdstudio project for image generation and modification
Python
30
star
29

rusty-bunny

a tool that lets you write smart bookmarks
Rust
23
star
30

pytorch-quantization-workshop

Code for a workshop hosted at the MLOps World Summit '22
Jupyter Notebook
16
star
31

insights_dashboard

Insights Dashboard is a sample app that integrates with Meta's Insights APIs
JavaScript
14
star
32

lead-ads-webhook-sample

Sample code to accelerate client's adoption of Lead Ads and Conversion Leads products, by integrating with our advertising platform. Developers can also take this as reference when building integrations, without having to start from scratch.
C#
14
star
33

ListViewToRecyclerView

Library to help products migrate from ListView to RecyclerView.
Java
11
star
34

fbrell

An interactive environment to explore the Facebook JavaScript SDK.
Go
11
star
35

GetRecommendations

A complete, sample android application that uses the Audience Network SDK.
Java
10
star
36

share_to_reels_android

Android sample app with Share to Reels
Java
10
star
37

OptiMate

Sample codes that allows to fetch different Reach and Frequency curves from the Facebook Marketing API.
Python
10
star
38

discord-help-bot

This is the code used in a tutorial called "Build a Discord bot with Rust and Serenity"
Rust
9
star
39

share_to_reels_ios

iOS sample app with Share to Reels
Swift
7
star
40

f8-2014

For sample code used during sessions at the 2014 F8 conference.
Objective-C
7
star
41

cp_reference

We are building a 3rd party commerce platform partner reference implementation.
Python
7
star
42

typefast

An auto-deployable scripting environment that enables people to quickly leverage powerful automation tools.
JavaScript
6
star
43

python-typing-tutorial

A sample Python project to demonstrate basic type checking concepts and best practices.
Python
5
star
44

mit-dl-workshop

Jupyter Notebook
5
star
45

caldera-security-tests

This project was created to provide examples of a TTP Runner and Security Regression Pipeline using vulnerabilities discovered in MITRE CALDERA by Jayson Grace from Meta's Purple Team.
Go
5
star
46

video-template-builder

An intuitive tool for creating dynamic video templates. Seamlessly integrate and customize videos, images, and audio files to produce new media at scale.
Python
4
star
47

transparent-automated-ads-demo-app

A demo web app to simulate the marketplace integration for Transparent Automated Ads
JavaScript
3
star
48

NeurIPS2018

Notebooks from the NIPS 2018 booth screen rolling deck
Jupyter Notebook
3
star
49

Facebook-Reels-Publishing-API-Postman-Collection

A Postman Collection that contains requests to upload Reels to Facebook
3
star
50

marketing_messages_measurement

This project provides best practices on how to measure WhatsApp marketing messages effectively, understand how many incremental conversions businesses canget as well as how to compare the effectiveness of marketing messages against other external platforms such as email/SMS.
R
2
star
51

MediaSpatialAppTemplate

A sample media Android app works on Quest devices, in both Android 2D Panel Mode and Immersive Mode supported by Meta Spatial SDK.
Kotlin
2
star
52

wamquery

Collection of runtime primitives for implementing a SQL-like query language
C
2
star
53

portal-sdk-samples

Sample implementations demonstrating how to integrate various Portal SDK feature modules into an Android App for Portal
Java
1
star
54

cppcon24-async-demo

Demo application for C++con 2024 to showcase async stacks
Python
1
star