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

Prevent ownership takeover isn't designed to be used dynamically during time correct?

If we have a rigidbody that multiple poeple may be touching but we dont want realtime transform to automatically transfer ownership of.

Change the Local Prefab Avatar

In the Realtime Avatar Manager class, how do I change the Local Prefab Avatar at runtime?

Can you get a client id directly from realtimetransform?

Can you get a client id directly from realtimetransform?

Able to connect to room from Unity Editor but get this error when building to the Quest 3

2024/04/10 19:16:36.282 9024 9045 Error Unity Realtime (native): BidirectionalClient: Connection Error: Unable to connect to normcore-matcher.normcore.io on port 3000, error: No address associated with hostname Any ideas what might be the cause?...

Custom avatar's animated hands not syncing to the network

I have a custom prefab linked as the Local Avatar Prefab on the Realtime Avatar Manager on Realtime + VR Player. In the scene I have a script using AvatarCreated() to SetActive(true/false) different nested objects in the avatar prefab so player 1 vs player 2 have different hand objects under the Left Hand and Right Hand hierarchy. Another script is on the Left Hand and Right Hand objects directly, which takes the controller's trigger value to blend an animation on the nested objects into clenching a fist....

the easiest way to check synchronized of transform object

I'd like to know that how to check the timeline by use stopwatch.

How to get local player?

How can i get the local player and assign it to a variable?

Why the Realtime instantiated object is not always ready

I am trying to instantiate objects that have RigidBody and no custom Realtime components. If I have three objects usually at least one of them is missing the Model. After Realtime.Instantiate call I try to call RequestOwnership but it fails with "Exception: This component doesn't have a model. Wait until the model is present before interacting with the ownership." error. This does not happen everytime. Next time I launch the game the same object might work and then next time it doesn't. I have not found any pattern on this....

Should a realtime custom component that is changing every frame be handled any differently?

Or should you still just use a didchange event even if it is changing every frame all the time?
Solution:
did change is probably better then

Toggle UI visibility on button clicked

I'm new to Normcore and working on an application moving objects and creating UI callouts for those objects when buttons are pressed. I have the synchronization for the objects working properly calling but am having difficulty showing visibility of the UI information. The UI is a child of each object so as it moves when the button is pressed or rotates with the slider the UI follows along with it. What is the best approach to toggle and sync this UI visibility?
Solution:
---------------------- To synchronize the visibility of a UI element in Normcore, you can create a custom RealtimeComponent. This component will synchronize the state of the UI visibility between the Unity scene and the Normcore datastore. Here's a general approach: ...

Setting position of object not updating on other clients

I am working on a script to allow for shooting. I am spawning bullets like this: ```csharp GameObject bulletGameObject = Realtime.Instantiate(prefabName: "Bullet", // Prefab name ownedByClient: true, // Make sure the RealtimeView on this prefab is owned by this client preventOwnershipTakeover: true, // Prevent other clients from calling RequestOwnership() on the root RealtimeView....
Solution:
---------------------- The issue you're experiencing is likely due to the fact that you're setting the position of the bullet after instantiating it. When you instantiate a Realtime prefab, it is instantiated on all clients. However, the position update you're making after instantiation is not being synchronized across all clients. To solve this, you should use the Realtime.Instantiate() method that allows you to specify the position and rotation during instantiation. This will ensure that the position and rotation are set correctly on all clients. ...

Constant force syncing

So if you have a constant force that is being applied to an object, Should you bother trying to sync turning it on and off between players or does it not matter because whoever owns it will simply control the rigidbody behavior anyway.
Solution:
no need to sync the extra force then

How to disable and enable the prefab with normcore

Hi. I'm new to the multiplayer game. I'd like to disable and enable the prefab in my game while running. I'm using .SetActive() now. How do I use normcore?...
Solution:
---------------------- If you want to remove the object at index 0 after finishing the loop, you can do so by calling the RemoveAt() method on the list. Here's how you can modify the previous example: ```csharp using UnityEngine;...

Disabling object with realtime view?

I see you aren't supposed to start with a disabled view but what about disabling and reenabling a realtime view during runtime after that?
Solution:
eh ok I found the issue it was getting disabled elsewhere. So I guess it's fine to enable and disable them as long as it's after they are registered.

Best way to support async room loading?

Lately we've been working on a feature to support faster loading of normcore rooms, so that we can split larger areas over multiple rooms and load/unload them as needed. I made an object pool to reduce Instantiations on the initial room load, and we preload the pool with the total number of RealtimeView instances in the room (we keep track of these on the "host" client). However, even doing this, there's a significant bit of lag when loading in the room (about 845ms with 6 players, testing with roughly 1800 RealtimeModels in the room. This is the higher end of the possible object count though. 240 objects would be more typical for 6 players). We have a lot of small networked objects in the room per player, so it's difficult to improve this by reducing realtime model instances, since they all have properties that need to be networked individually. What we've tried: - preload pooled object instances - pre-activate the pooled objects and move them off-screen...

Adding player and Object Physics

I wish to add Player and object physics but I don’t know we’re to start?

Does setting a fresh realtime component upon entering a room model fire a didchange event?

It seems like it should, but the behavoir i'm getting at the moment seems like it is not. There was a bug fix in normcore for a didchange vent that was failing to fire but I believe that is fixed in my version 2.7

RequestOwnership() and a ball

I am working on a simple game that involves players applying forces to a shared ball. Documentation suggests that I should use RequestOwnership() to do this, but I am having trouble getting it to function as described. What am I missing? Thank you.
Solution:
also you only need ownership of the realtime transform

Cost Estimation and Usage Metrics

I'm trying to get a sense of cost as my game scales. I'm still on the base tier (no overages) so my bill of $49 is not giving me much insight. It also seems like the developer dashboard/billing overview is not updating. I know about the pricing, but it is hard to extrapolate and I'd rather user actual usage data from my application. Are there any examples of average cost per user? Voice chat (I assume this is usually the bulk of data) plus a few dozen realtime transforms? All of this is a bit of...

What is the point of having multiple rooms?

If it's not possible to transfer data from one room to another what is the point of having multiple rooms?
Solution:
These answers are correct fwiw. Typically folks have a RealtimeAvatarManager on each Realtime instance. You can enable/disable it to spawn the avatar for the local player. Which you can use to move a player between rooms.