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

✨normcore

πŸ’¬chat

🚧wip-and-updates

Strategies for updating clients when the normcore realtime models have changed?

When new properties or realtime prefabs are added, is it still possible for new clients to connect to rooms with older clients, or will the network contract be broken for older clients until they update their app? Are there any ideal ways to go about pushing app updates that make realtime model changes without disallowing older clients from connecting?
Solution:
Yes new and old clients can talk just fine. Old clients ignore propertyIDs they haven’t seen before

Does normcore support screen sharing for WebGL?

We were interested in Normcore due to this demo: https://normcore.io/webgl-demo. We can't find any concrete information on whether screen sharing is supported. We need to ensure that screen sharing is supported before we decide to use Normcore. Also, if it is supported, is there a guide on how to create our own application like in the demo? I mean, a proper guide that decreases workload time. We do not mind using Normcore Pro/Unlimited or any custom plan if our requirements are guaranteed....
Solution:
once you have the byte stream you can sync it using normcore no problem

No definition when trying to access DidChange callback

I have this error message: Assets/Scripts/GameState/GameStateSync.cs(17,27): error CS1061: 'GameStateModel' does not contain a definition for 'playerstatesDidChange' and no accessible extension method 'playerstatesDidChange' accepting a first argument of type 'GameStateModel' could be found (are you missing a using directive or an assembly reference?) ...
Solution:
---------------------- The error message you're seeing is indicating that there's no playerstatesDidChange event in your GameStateModel. This event is typically generated when you set the last argument of the RealtimeProperty attribute to true, which you have done. However, it seems like the event is not being generated for your RealtimeDictionary. The issue might be related to the use of RealtimeDictionary with the RealtimeProperty attribute. In the provided knowledge sources, the examples of RealtimeProperty usage are with primitive types like Color and string, not with RealtimeDictionary. ...

Realtime Avatar manager avatars count issue.

When i connect to a room that already has another connected player, i check for the realtimeavatarmanager.avatars.count inside DidConnectToRoom but it is 0 even though the connecting player ends up in the same room as the already connected one. What could possibly be the origin of this issue?
Solution:
---------------------- The issue you're experiencing might be due to the timing of when you're checking the avatars count. The DidConnectToRoom event is fired as soon as the connection to the room is established, but it doesn't necessarily mean that all the avatars have been instantiated and registered with the RealtimeAvatarManager at that point. The RealtimeAvatarManager keeps track of all avatars in the room via the localAvatar and avatars properties. The avatars property is a dictionary of all RealtimeAvatar components stored under the clientID that the avatar belongs to. This is useful for determining how many players are currently in a multiplayer space. However, the avatars might not be instantiated immediately upon connection. ...

Play animations at runtime

Hi Kapa bot, I got Multiplayer and player control working including animations for the local player. Once we join a room the other player can not see my animations (for example walking animation) and vice versa. I do see the player moving around, but only the animations do not execute. I have tried the tutorial on syncing Custom Data, but have no luck so far. Can you maybe explain to me how to make it so I can see other players' animations?...
Solution:
if you use mechanim for walk animation it can be driven by velocity so there's no need to sync the walk animation

VR Avatar hands reference

How to change the VR CustomAvatar Left Hand and Right Hand from tracking the controllers position to tracking the actual VR hands instead?

Store list of player states

I want to check the readiness of players, to identify who is currently playing which means the rest of the players cannot currently play. So I'm thinking I need to retrieve client IDs locally and then add that to a dictionary or a realtime set?
Solution:
you can just add a model to the avatar which syncs a bool for ready

Can't see other player

Both players enter the same room but we can't see each others avatar. What could be the problem? I followed the basic Player Controller tutorial. It's on WebGL. Our API key is upgraded to WebGL.
Solution:
I think it was because I had multiple avatar child prefabs (deactivated) in one player prefab. I just activated the one the player chose in character selection and figured it would work. But it didn't so I have made multiple Player prefabs with each there own avatar prefab and that seems to work.

How to create a full body IK avatar?

How to create a full body IK remote avatar using final IK?
Solution:
put realtime transforms on the ik targets (head and controllers) and then get the remote avatar to use ik targets to drive the animation

Syncing Sounds?

Hey everyone 🀟🏻 In our multiplayer soccer game, we need to synchronize sound clips and and some values that are needed for those sounds to be played (such as power of a kick, or a random index of from bunch of audio clips) Actually most of the settings (such as Pitch/volume over power, list of possible random audio clips for a single action) are set in a ScriptableObject; so all I need to have is "name of the sound to be played, random index(if there are multiple clips), and power of the action" We've experienced kind of a similar issue with animations; and our solution was to synchronize a set of so-called "Animation Packages". Whenever an animation is triggered by a player, an anim package (consists of animationType enum, intensity, value and a selector value) is added to the realtime set, and other players would "simulate" that animation on their side. My question to y'all is whether it sounds logical to pass around those data for playing a single shot audio clip. ...

Are model value updates all received at the same time?

As stated in the title, if I updated multiple values on a model at the same time (Reliable ones for context), would it be guaranteed that on the receiving end that all these values would be received at the same time? I know for unreliable this isn't the case (At least I believe so, correct me if I am wrong), but if this is the case for reliable ones this could help drastically simplify some of my existing code around, which would be great. As an example, if I had a transform and my model contained position, rotation, and scale. If I set all 3 of these at once, could I consistently expect that they would all be received at the same time?...
Solution:
all changes made in the same network frame go out in the same packet. even if you hit the max packet size, they’re split but then regrouped on receive as though they were in the same packet. sets only send delta updates but changes to models within them go out in the same packet. what the bot is talking about here is that changes are deserialized like this:...

List of all events generated by the main normcore scripts?

Is it possible to get a list of all events fired by normcore scripts?

Reliably Updating Player Count in Room

What is the most reliably/common way of keeping track of player counts in a rooms through a backend service? Is it possible to query rooms from outside of Unity?
Solution:
We’ll be putting a list of folks together for the Lobby API beta in three weeks! stay tuned on that front

Video Stream?

Can I use NormCore to send a video stream from one client to another? or display a video stearm from some other source like OBS from a PC?
Solution:
---------------------- Yes, Normcore does provide support for media streams. It offers high-quality, low-latency audio streams via the CreateAudioInputStream() API. This API returns an AudioInputStream that can be used to send audio data to all clients. Once called, all clients will be able to retrieve a corresponding AudioOutputStream object using the GetAudioOutputStream() API along with the clientID and streamID from the AudioInputStream object. As for video streaming, Normcore's new MediaStream API is now available in private preview for Normcore Private customers. If you would like to use video streaming in your Normcore Private app, you should get in touch with your account manager for more information. ...

Button press on one client

What is the right way to sync a button press form one client to the rest, should I use an RPC event?
Solution:
you should give up on the rpc recipe, instead sync the the menu state as an int and use the model changed event to update the menu on clients

What happens if two different Realtime instances connect to the same room at the same time??

What happens if two different Realtime instances connect to the same room name at the same time?

How does Normcore work?

Welcome to the server Kapa, tell me about Normcore and how it works.