snowball
snowball5mo ago

Falling through floor

I have 2 instances of my game open, one of them is in the unity editor and the other is an external built. If i load into the unity editor first, i can walk around fine. But if I load into the external build, i fall through the floor. However on the unity build, the second player does not fall through the floor and appears to be working as normal. If you need me to send screenshots and a script I will because I don't think i explained it that well. Any help regardless??
8 Replies
kapa.ai
kapa.ai5mo ago
Hi @SnowyCrash. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. However, based on the information you provided, it seems like there might be an issue with the physics or collision settings in your external build. In the context of NormalVR, you might want to check if the player object has the correct ownership settings. In multiplayer settings, you should only control your own player. This is done by checking if the instance is owned by the local client before calling update methods. Here's a snippet from the NormalVR documentation that shows how this is done:
private void Update() {
// Call LocalUpdate() only if this instance is owned by the local client
if (_realtimeView.isOwnedLocallyInHierarchy)
LocalUpdate();
}
private void Update() {
// Call LocalUpdate() only if this instance is owned by the local client
if (_realtimeView.isOwnedLocallyInHierarchy)
LocalUpdate();
}
You can find more details in the NormalVR documentation (https://normcore.io/documentation/guides/creating-a-player-controller#making-it-multiplayer). If the issue persists, it would be helpful to see the script and screenshots to better understand the problem. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5mo ago
<@913632151709298698> kapa.ai is still learning and improving, please let us know how it did by reacting below
Mechabit
Mechabit5mo ago
by external build do you mean a standalone build or one that was built on another machine?
snowball
snowballOP5mo ago
It's a standalone build, I used build and run to test it out. I'll send a video of what my problem is
Mechabit
Mechabit5mo ago
are you perhaps running character code on a remote avatar
snowball
snowballOP5mo ago
snowball
snowballOP5mo ago
I have a character controller script running on my prefab which I put into the realtime component
Mechabit
Mechabit5mo ago
typically you check isOwnedLocally to avoid running code on remote avatars in that case I would disable all movement scripts at Start if realtimeView.IsOwnedLocally == false the only thing you need on a remote avatar is the realtime transform and view disable everything else

Did you find this page helpful?