cryptomax
NNormal
•Created by cryptomax on 12/11/2024 in #🤝ask-a-question
Force Event firing
What property do we set to force event firing if the model is updated but not changed?
11 replies
NNormal
•Created by cryptomax on 11/30/2024 in #💭feature-request
Gracefully handle Activating realtime objects in scene?
Maybe this is already the case, but as I recall Max had said that simply turning on a disabled model/ object with a realtime on it "would eventually sync" but there was no way to know exactly when. Could it not be base line behavior that it would just handle syncing any objects that were enabled or disabled to handle this by default?
8 replies
NNormal
•Created by cryptomax on 11/27/2024 in #🤝ask-a-question
'RealtimeComponent has been replaced with RealtimeComponent<TModel>. Please upgrade
If i 'm getting this message on a script what features am I missing particularly on the mode?
9 replies
NNormal
•Created by cryptomax on 7/1/2024 in #🤝ask-a-question
Are there any best practices for syncing a large number of variables in one script?
For instance if we have a large script with many bools floats, integers etc and they all need to be synced and will all be changing at different times.
9 replies
NNormal
•Created by cryptomax on 6/23/2024 in #🤝ask-a-question
Does Realtime transform work differently on a 2D rigidbody vs a 3D rigidbody?
I'm having an issue where it seems like the rigidbody has no velocity when being moved by the realtime transform on the remote client.
18 replies
NNormal
•Created by cryptomax on 6/16/2024 in #💭feature-request
Control instantiation rate on connection?
So if you have 30-50 rigibodies when connecting to a room there is a pretty heavy duty hiccup. A way to stagger that instantiation burst that was built in would be pretty nice.
6 replies
NNormal
•Created by cryptomax on 6/6/2024 in #💭feature-request
Possible option to force firing updated model event
Not sure if there are technical difficulties with doing something like this, but to have an event (or maybe just a property setting) that would fire the event if the model was sent an update even if the model didn't change value. This would make it so you could easily use a simple int to continously play various sound effects or trigger various animations from just an int becuase it could keep firing?
18 replies
NNormal
•Created by cryptomax on 6/1/2024 in #🤝ask-a-question
DidChange Event not firing
The did change event is not firing on the client that is setting it from fresh.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Normal.Realtime;
public class ChangeEventTester : RealtimeComponent<IntSyncFreshModel>
{
public bool chooseRandomAtStart;
public Vector2 randomRange = new Vector2(1, 5); // Default random range
private IntSyncFreshModel _model;
protected override void OnRealtimeModelReplaced(IntSyncFreshModel previousModel, IntSyncFreshModel currentModel)
{
_model = currentModel;
if (previousModel != null) { previousModel.int1DidChange -= Int1DidChange; } if (currentModel != null) { if (currentModel.isFreshModel) { InitializeFreshModel(currentModel); } else { Int1DidChange(currentModel, currentModel.int1); } currentModel.int1DidChange += Int1DidChange; } } private void InitializeFreshModel(IntSyncFreshModel model) { Debug.Log("Model is fresh."); if (chooseRandomAtStart) { model.int1 = Random.Range((int)randomRange.x, (int)randomRange.y + 1); Debug.Log($"Random value picked: {model.int1}"); } else { model.int1 = 0; // Initialize with your desired default value Debug.Log("Set int1 to default value 0."); } } private void Int1DidChange(IntSyncFreshModel model, int value) { Debug.Log($"int1 changed to: {value}"); } public int GetCurrentInt() { return _model.int1; } } Any idea why that would be?
if (previousModel != null) { previousModel.int1DidChange -= Int1DidChange; } if (currentModel != null) { if (currentModel.isFreshModel) { InitializeFreshModel(currentModel); } else { Int1DidChange(currentModel, currentModel.int1); } currentModel.int1DidChange += Int1DidChange; } } private void InitializeFreshModel(IntSyncFreshModel model) { Debug.Log("Model is fresh."); if (chooseRandomAtStart) { model.int1 = Random.Range((int)randomRange.x, (int)randomRange.y + 1); Debug.Log($"Random value picked: {model.int1}"); } else { model.int1 = 0; // Initialize with your desired default value Debug.Log("Set int1 to default value 0."); } } private void Int1DidChange(IntSyncFreshModel model, int value) { Debug.Log($"int1 changed to: {value}"); } public int GetCurrentInt() { return _model.int1; } } Any idea why that would be?
10 replies
NNormal
•Created by cryptomax on 5/30/2024 in #🤝ask-a-question
OwnerIDSelfDidChange
Does realtimeView Have this event as well or only RealtimeTransform?
8 replies
NNormal
•Created by cryptomax on 5/28/2024 in #🤝ask-a-question
rigidbody realtime transform vs just realtime transform
I am aware that realtime transform has two modes one for rigibodies and one for non, are you able to tell me the number of properties that are syncing in either case? I'm curious to know the sheer number of extra properties rigidbody transform syncs
34 replies
NNormal
•Created by cryptomax on 5/21/2024 in #🤝ask-a-question
Enabling Gameobject with realtime view on it
If I have a game obejct that is off when the scene loads, and that game obejct has a realtime view and custom component on it, will the realtime view properly register with the realtime when I enable the game obejct?
6 replies
NNormal
•Created by cryptomax on 5/17/2024 in #🤝ask-a-question
*probes bot for insider information on when the room API will be ready*
🙂
7 replies
NNormal
•Created by cryptomax on 5/9/2024 in #🤝ask-a-question
RealtimeView doesn't have a connected property?
It appears RealtimeView doesnt' have a connected property, whats the best way to get connection state from it?
4 replies
NNormal
•Created by cryptomax on 5/2/2024 in #🤝ask-a-question
What happens if we disable a rigidbody game object with a realtime transform and view on it?
Will it be able to resume syncing if reenabled? Does it break the object?
10 replies
NNormal
•Created by cryptomax on 4/17/2024 in #🤝ask-a-question
Checking realtimeTransform.isOwnedLocallySelf
Is checking this identical to checking any local bool in a script or does it have to fetch that property from the server?
11 replies
NNormal
•Created by cryptomax on 4/16/2024 in #🤝ask-a-question
If two players request ownership at the same moment
Are there circumstances where it looks momentarily like you could own the item locally but then your ownership is rejected by the server?
25 replies
NNormal
•Created by cryptomax on 4/15/2024 in #🤝ask-a-question
Does syncing a rigidbody with realtime transform while kinematic limit the values being synced?
If a rigidbody is kinematic does realtime transform truncate the sync variables in any way for efficiency?
6 replies
NNormal
•Created by cryptomax on 4/14/2024 in #🤝ask-a-question
Manually syncing position, rotation at 20hz?
If I were manually syncing an object position and rotation, should the model setter just be setting every frame or can resources be saved by setting it only 20x a second becuase thats what normcore would use anyway? It woudnlt' be in sync with normcores refresh anyway i'd assume so how does that work? Is there a way to sync at normcores refresh rate?
32 replies
NNormal
•Created by cryptomax on 4/12/2024 in #🤝ask-a-question
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.
14 replies
NNormal
•Created by cryptomax on 4/11/2024 in #🤝ask-a-question
Can you get a client id directly from realtimetransform?
Can you get a client id directly from realtimetransform?
36 replies