Support for networking physics
Describe the bug 💬
To implement real-time multiplayer functionality, we used syncedRoom and playerSync.
However, when two browsers access the same URL, the character of the first browser does not already exist, but two characters are created and manipulated at the same time. Afterwards, the second character is created in the initial position in the first browser, and these characters do not affect the position of the characters in each browser.
Also, after adding the syncedRoom and Player Sync, the camera doesn't follow the character like before.
Operating System 👩💻
Windows
What browsers are you seeing the problem on? 🏄♂️
Chrome
Editor Version 🎲
2021.3
Needle Exporter version
2.67.13-pre
Project Info (Unity only) 📜
{
"ExportInfoGameObjectName": "Export",
"ExportInfoGameObjectIsEnabled": true,
"UnityProjectPath": "C:/Users/wisdom99/Desktop/capstone2/New Unity Project/Assets",
"UnityVersion": "2021.3.23f1",
"SceneName": "1차시도",
"ProjectPath": "Library/Needle/Sample",
"ProjectDirectoryExists": true,
"ProjectIsInstalled": true,
"NeedleEngineInstalled": true,
"HasNodeInstalled": true,
"NodeVersion": "v16.13.1",
"NpmVersion": "8.3.0",
"TypescriptVersion": "'\u0000t\u0000s\u0000c\u0000'\u0000@�(\u0000��)\u0000 \u0000���� \u0000\u0010��� \u0000xƀ� \u0000��9�,\u0000 \u0000��`� \u0000\u0018� \u0000�ǔ� \u0000\u0004�\\�����,\u0000 \u0000\u0010���; \u0000; \u00000�X� \u0000\f�|�t� \u0000D�ٲȲ�.\u0000; \u0000; \u0000",
"HasTokTxInstalled": true,
"HasMinimumToktxVersionInstalled": false,
"RenderPipeline": "Built-in",
"GzipEnabled": false,
"NeedleEngineExporterVersion": "2.67.13-pre",
"NeedleEngineVersion": "2.67.13-pre",
"NeedleEngineExporterPath": "Packages/com.needle.engine-exporter/package.json",
"NeedleEnginePath": "Packages/com.needle.engine/package.json",
"FileStats": "By Type:\r\n•\t.glb → x 3 = 5.9 mb\r\n•\t<b>Total = 5.9 mb</b>\r\n----\r\nBy Directory:\r\n•\tassets → x 3 = 5.9 mb\r\n",
"NeedleComponentsInScene": [
"Needle.Engine.ExportInfo",
"Needle.Engine.Codegen.ComponentGenerator",
"Needle.Engine.Deployment.DeployToGlitch",
"Needle.Engine.Deployment.DeployToFTP",
"Needle.Engine.Components.GltfObject",
"Needle.Engine.Components.ObjectRaycaster",
"Needle.Engine.Components.WebARSessionRoot",
"Needle.Engine.Components.WebXR",
"Needle.Engine.Components.OrbitControls",
"Needle.Engine.Components.SmoothFollow",
"Needle.Typescript.GeneratedComponents.PlayAnimationOnTrigger",
"Needle.Engine.AdditionalData.AnimationData",
"Needle.Typescript.GeneratedComponents.PhysicsTrigger",
"Needle.Typescript.GeneratedComponents.AutoReset",
"Needle.Engine.Components.XRRig",
"Needle.Engine.Components.Networking",
"Needle.Engine.Components.SyncedRoom",
"Needle.Engine.Components.PlayerSync"
],
"TypeCacheIsDirty": false,
"TypeScriptTypes": []
}
Steps to reproduce 🔢
1. starting server
2. open more than one browser
Reproduction ♻
https://livecauac-my.sharepoint.com/:u:/g/personal/cocoa389_cau_ac_kr/EVHiQPPFgw9OouhkcNiMcDYBEUOBg8lRjGT6z-60uVwRRg?e=MjZQ9y
Validations 🩹
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Needle-Engine-specific issue. For example if it's a Unity related bug, it should be reported to Unity instead.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
Can you update to the latest 3.x version? We're pretty sure networking is working (using and testing it regularly).
Discord post: https://discord.com/channels/717429793926283276/1101576389439791104
Hello @Wisdom-Kim the problem here is that you try to combine a component that doesnt handle networking ownership (the experimental CharacterControllerInput) and that's why ever connected user controls all instantiated avatars. I'll take a look at adding support for that