我应该用什么来代替“获取玩家控制器"?制作多人游戏(自上而下游戏虚幻引擎) [英] What should I use instead of "get player controller" to make a Multiplayer game (Top Down Game Unreal Engine)

查看:117
本文介绍了我应该用什么来代替“获取玩家控制器"?制作多人游戏(自上而下游戏虚幻引擎)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当天早些时候,我想出了为什么我的游戏无法在多人游戏中运行.原因是我使用了获取玩家控制器".这给了我索引 0,所以我无法工作.但是我使用它来获取我的玩家必须查看的位置(用于获取光标下的命中结果),我也使用它来生成我的玩家发射的射弹.

Earlier in the day i figured out why my game doesn't work on multiplayer. The reason is that I use the "get player controller" which gives me the index 0 so i can't work. But i use this to get location where my player has to look at (for the get hit result under cursor) and I also use that for make spawn the projectile that my player launch.

你知道我可以用什么来让我的游戏在多人游戏中运行吗.

Do you have an idea of what i could use to make my game work on multiplayer.

这里有 2 个屏幕.如果您需要其他信息,请告诉我.

Here are 2 screen. Let me know if you need some other informations.

发射弹丸的事件功能旋转到面部光标

推荐答案

请记住,您无法从另一个客户端获取客户端的播放器控制器.控制器只存在于服务器上以及拥有它的人(玩家).

Remember that you cannot get a client's player controller from another client. Controllers exist only on server and who owns it (the player).

这篇关于我应该用什么来代替“获取玩家控制器"?制作多人游戏(自上而下游戏虚幻引擎)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆