cryptomax
cryptomax4mo ago

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?
7 Replies
kapa.ai
kapa.ai4mo ago
Hi @cryptomax. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The isOwnedLocallySelf property of a RealtimeModel in NormalVR is a boolean that indicates whether the model is owned by the local client. It's similar to checking a local boolean in a script, but it's specifically related to the ownership status of the model in the context of a multiplayer environment. This property does not need to fetch the information from the server each time it's checked. It's updated locally based on the ownership status of the model, which is determined by the server when ownership is requested or transferred. In a similar way, the isOwnedLocallyInHierarchy property checks if the model or any of its parents are owned locally. Remember, in order to move an object with a RealtimeTransform component, your client needs to be the owner of the RealtimeTransform component. You can request ownership of a RealtimeTransform component by calling RequestOwnership(). Here are the relevant sources for more information: - RealtimeModel Properties (https://normcore.io/documentation/reference/classes/Normal.Realtime.RealtimeModel) - RealtimeTransform How it works (https://normcore.io/documentation/realtime/realtimetransform#how-it-works) - Networked Physics (https://normcore.io/documentation/realtime/networked-physics#ownership--physics) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4mo ago
<@401986039964631060> kapa.ai is still learning and improving, please let us know how it did by reacting below
Camobiwon
Camobiwon4mo ago
isOwnedLocallySelf / isOwnedRemotelySelf specifically is kind of expensive at the moment because it has to do an external plugin call. Local bool would be much faster, I'd recommend looking at Liam's RealtimeTransformOptimizer since it avoids this problem by using ownerIDSelf instead which is way way faster. Fortunately this is already made aware to Max and it's on their plans to fix
cryptomax
cryptomax4mo ago
So that means this bot response isn’t actually correct here?
Camobiwon
Camobiwon4mo ago
It doesn't know about the lower level internals
cryptomax
cryptomax4mo ago
Interesting, I am using the optimizer I’ll have to look at then if I could tweak it to just update a bool when needed and then simply check that actual local bool in my update instead of isownedlocally yeah thanks nice idea! I can just make it public and use it instead of doing the isOwnedlocal call! and thanks @liamc for providing your script
liamc
liamc4mo ago
No worries!
More Posts
Suddenly unable to connect to Normcore serversHey guys, as of yesterday I could connect to the servers using the same app key as I am using now. Arcade Legend | Meta QuestBUILD. PLAY. BOWL. THROW. PARTY. EXPLORE. Build and customize your own arcade while playing officiaIf two players request ownership at the same momentAre there circumstances where it looks momentarily like you could own the item locally but then yourIs there a way to make my own avatar invisible to myself but keep it visible for others?I've tried some to apply so easy stuff that I could think of - turning off rendering, not displayingWhat's the best way to change scenes across all clients?Hi guys! As per the title, my application requires that all users be in a certain room at a certainTrying to update a value reliablyI have a realtime property for example fillpercentage property. Now every client can update that proDoes 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 efficHow to record sessions with RealtimeSessionCapture> ⚠️ **DISCLAIMER: This API will be removed in some upcoming release (probably 3.0). The whole soluHow to make a custom model using a type other than Color?Hey guys! I have been following the Synchronising Custom Data guide (https://normcore.io/documentatiManually syncing position, rotation at 20hz?If I were manually syncing an object position and rotation, should the model setter just be setting