We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在切换到其他页面,没有聚焦到项目网页的情况下会出现人物有即将掉出地图趋势(人物在地面上抖动,像是不停陷入地面又因物理引擎被挤回来的感觉),有时候也会掉出地图。在集成多人在线功能websockt的时候,如果接收到ws消息并修改其他玩家位置频率过快,也会出现同样的问题。我猜测是算力过大导致。如果修改其他玩家的位置频率更快,比如1ms修改一次。人物甚至会像卡在地上,移动类似滑冰一样,而且失去跳跃能力。
The text was updated successfully, but these errors were encountered:
这是我的项目仓库:https://github.com/RayLee666/ecctrl_multiplay 如果您方便可以帮我看看原因,可以在src/components/Player.jsx中的45行的 if(isPressing)注释掉,并且在41行修改发送给ws服务器的频率。 感谢陈老师
Sorry, something went wrong.
多人模式不确定,只测过playroomkit
你可以延后让物理引擎启动<Physics paused={!gameStart} ,然后是你的多人是通过map结构渲染的,每次map数据变化时,所有其他玩家都会重新渲染一遍。你需要通过ws实时添加和检测模型id来进行一对一的变化,以避免过多的渲染导致性能问题。
<Physics paused={!gameStart}
如果人物抖动,可以设置 autoBalance={false}
No branches or pull requests
在切换到其他页面,没有聚焦到项目网页的情况下会出现人物有即将掉出地图趋势(人物在地面上抖动,像是不停陷入地面又因物理引擎被挤回来的感觉),有时候也会掉出地图。在集成多人在线功能websockt的时候,如果接收到ws消息并修改其他玩家位置频率过快,也会出现同样的问题。我猜测是算力过大导致。如果修改其他玩家的位置频率更快,比如1ms修改一次。人物甚至会像卡在地上,移动类似滑冰一样,而且失去跳跃能力。
The text was updated successfully, but these errors were encountered: