Normal

N

Normal

Join the community to ask questions about Normal and get answers from other members.

Join

馃ask-a-question

馃捈jobs-and-opportunities

馃捑sample-code

馃project-showcase

馃挱feature-request

鉁╪ormcore

馃挰chat

馃毀wip-and-updates

How to record sessions with RealtimeSessionCapture

鈿狅笍 DISCLAIMER: This API will be removed in some upcoming release (probably 3.0). The whole solution (for simplicity reasons) is best to be implemented on the server side. Anyway, if any of you really need to try it, feel free to go.
鈿狅笍 DISCLAIMER 2: The sample code provided is simple enough for you to integrate with your case and way to launch recording. Basically it records when room connects or script is enabled. Stops capture when the script is disabled or room disconnects. More important are the troubleshooting steps.
What do I need it for?...

Quest Hands for Normcore

Original post and all credit goes to @kit [absurd:joy] https://discord.com/channels/393839515074297858/677646675560366141/744618488949375026
A while back Dylan (here on discord) shared a project where they did Quest hand tracking networked with Normcore. I wanted to do something similar, but updated for the new oculus runtime, the new Normcore2 preview, and optimized a bit further. the result is a new package - ...

How to use RealtimeDictionary

Original post and all credit goes to @Nathaniel https://discord.com/channels/393839515074297858/677646675560366141/819412222765563904
I was having trouble finding examples of how to use RealtimeDictionary, so I put up a quick guide on how it works for anyone who gets stuck in the future: https://gist.github.com/d12/f577bb50b0fdeeb17084819c78fe5c43...

Toggle synchronization of RealtimeTransform with Rigidbody by enabling/disabling this component.

Original post and all credit goes to @Micha艂 Wr贸blewski https://discord.com/channels/393839515074297858/677646675560366141/863111038589206568
Allows to enable/disable synchronization of RealtimeTransform bundled with Rigidbody by enabling/disabling this component. It just forces to kill the remaining running coroutine. The syncing of RealtimeTransform triggers physics syncing every frame, even when objects aren't moving. so once you get to a couple hundred in the scene, the performance hit really adds up. with just a couple hundred objects you can hit multiple ms per frame, even if you're only moving a few of those per frame...

Improve performance of RealtimeTransforms in Rigidbody mode.

Original post and all credit goes to @liamc https://discord.com/channels/393839515074297858/677646675560366141/1046741601826914305
I wrote a script that attaches to a RealtimeTransform in Rigidbody mode and gives me a roughly 3x improvement in the FixedUpdate performance. It's just a prototype for now, i haven't tested it thoroughly and there could be edge cases i haven't considered yet. Plus its using reflection so it could completely break if a method gets renamed in a future normcore update. But I think some of the principles could be safely applied to the normcore source without changing any behaviour and breaking backwards compatibility . E.g, caching the results of the model null check and model.isOwnedLocallySelf instead of calling them twice. https://gist.github.com/liamcary/628e5c4833ae0ba18c2c570992aeb993...
No description

MRTK-Online V2

Original post and all credit goes to @pvncher https://discord.com/channels/393839515074297858/677646675560366141/696127913476489236
Made a Normcore sample with MRTK for Oculus Quest Here is #MRTK-Online!...

7 Steps To Setup A Basic VR Multiplayer Ball Toss Using Normcore

Original post and all credit goes to @Babbel https://discord.com/channels/393839515074297858/677646675560366141/697233719517380659
I saw a few people asking a question that I was also asking: how to setup a throwable object scenario. Scoured through the back logs here to find the simplest path to get there, and wrote up this instructional. Should take less than 10 minutes to go from importing Normcore to functional throwing multiplayer. I've mostly been using it to teach some friends who are completely new to the software, but hope its useful to you all to. Thanks Normcore! https://arvrjourney.com/how-to-setup-a-basic-vr-multiplayer-ball-toss-using-normcore-d86f1476e87c (and if anyone sees ways to improve this, definitely appreciate the feedback)...

RealtimePoolManager Setup and Usage Guide

Original post and all credit goes to @Harris Saleem https://discord.com/channels/393839515074297858/677646675560366141/1168973003799941120
Someone just asked me to send them the code snippet of how I am using RealtimePoolManager in my project for all the prefabs and avatars so I just created a gist, hope it helps someone who hasn't already implemented pooling with RealtimePrefabs. https://gist.github.com/harrissaleem/4db886a735a2f5af88abfaeca6505290...

Normcore Parameter Binder v1.0

Original post and all credit goes to @Chait https://discord.com/channels/393839515074297858/677646675560366141/749831051186143265
Hey folks, I wanted to share the first release of the Parameter Binder. Hope y'all find it useful. https://github.com/chetu3319/Normcore-ParameterBinder/releases/tag/v1.0...

Simple serverless-backend for managing a room list using Google Cloud Functions and Firestore.

Original post and all credit goes to @liamc https://discord.com/channels/393839515074297858/677646675560366141/945939134076293151
Normcore-adjacent code: yesterday i prototyped a simple serverless-backend for managing a room list using Google Cloud Functions and Firestore. Once deployed to google cloud you can use normal http calls to create a room, join or leave an existing room and get a list of all rooms. https://github.com/liamcary/multiplayer-room-backend...

Script for spawning players on different spots

Original post and all credit goes to @Breynart Studios https://discord.com/channels/393839515074297858/677646675560366141/959413806755368960
Script for spawning players on different spots: Note: I have a public Transform[] array located in a script called GameManager, called "playerPos". Inside that array, there are different empty GameObjects located on the positions where I want my players to spawn....
No description

Fixes issues caused by RealtimeTransform's sometimes dropping important updates

Original post and all credit goes to @Nathaniel https://discord.com/channels/393839515074297858/677646675560366141/809160467699990578
In case anyone else is experiencing issues with RealtimeTransform's sometimes dropping important position updates (mainly singular large programmatic position updates), this is the script we're using to work around the problem: https://gist.github.com/d12/43e4b4425141bf3c7d24820f20e9563e...

String-based leaderboard implementation

Original post and all credit goes to @Joshua @ Numinous https://discord.com/channels/393839515074297858/677646675560366141/689940947102204041
here's a string-based leaderboard implementation, hopefully I remembered everything: https://gist.github.com/Godatplay/5fe4335d518afc40f95be7a4ed47ae07 ...

Where do I start?

Hello everyone, the basic implementation for VR is really simple and fast, the problem I am facing now is that the documentation and examples are very vague. Where do I start? I have created a part of the project, now I want to implement nomrcore to start testing. The basics are done, movement and coordination of the players, now my next step is to "put" my NPCs. Do I first manage the player connections and from that assign the authorities of the NPCs? Code examples for managing clients? Assigning authority over NPCs or other objects? Sorry, I'm completely lost....

GUIDManager

I posted a very old version of this a long time ago (https://canary.discord.com/channels/393839515074297858/677646675560366141/981127682437836812) but have improved this script a lot over time and figured I would share a much better version of it until we get some official GUID component. This is intended for you to add a GUID int to your model, syncing it on start, and registering it to the GUIDManager's dictionary. Using it is extremely simple, let's say you had a Ball component reference you wanted to sync, first you'd make your ball component either derive from the simple GUIDModel pre-implemented one, or simply add your own int to your existing model (Check GUID model for how to set it up in OnRealtimeModelReplaced). Then in some other script that wants to send a reference to the ball, simply send the GUID of it (Typically ball.GUID as the ID reference), then when it is received on your local or remote client, simply do GUIDManager.FetchComponent<Ball>(guidOfBall) or alternatively GUIDManager.TryFetchComponent(guidOfBall, out Ball ball) if you prefer the bool return type for if it was found in the dictionary. My old implementation used to use strings of GUIDs to send for reference but I found this was very inefficient and changed it over entirely to ints. ints are 4 bytes compared to the GUID string being about 80, dictionary lookup hashing is literally free as the int is it's own hashcode, and many other efficiencies are gained over strings, and still allows for about 4 billion entries which is a crazy high amount. Hopefully you get some use out of this and find it useful :)...

Primitive Models

These are stupid simple but help me with some fast prototyping, just when I need a networked script with a singular synced and primitive variable.