我如何在阴影中隐藏一个对象而不使阴影完全黑暗(统一)
我在统一影子施法者方面遇到了问题,在游戏中,我想为玩家创建一个视野,当玩家在墙后面时,他们就会成为墙壁另一侧的其他人,就像在我们中间一样游戏。 我用Unity Shadow Caster 2D实现了这一目标,但问题是我必须将阴影强度提高到最大值,我想使阴影一半强度,并且在阴影中也是看不见的,如果在阴影中,我真的很高兴,如果有人可以帮助我解决这个问题。
同样,如果还有其他方法可以在没有2D照明和阴影的情况下使此视野进行此视野,我将很高兴知道它。
i had problem with Unity Shadow Caster, in my game i wanted to create a field of view for players that when players are behind a wall, they become invisible to others that are on the other side of the wall, just like in the among us game.
i achieved this with the unity Shadow caster 2d but the problem is i have to make the shadows intensity to the maximum, i want to make the shadows half intensity and also have the players be invisible when in the shadows, i would be really Glad if someone can help me with this issue.
also if there is any other way to make this field of View without 2d Lighting and Shadows i would be really glad to know about it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于Unity2D中的阴影,它们是非常越来越大的,您不会从它们那里得到所需的结果,因为以后您可能会遇到不会回去的问题,
这是基于圆锥视觉系统的链接,您可以使用这种方法,这与我们中间更相似
https://youtu.be/cseumtanfyk
我建议我建议使用射线播放系统来检测射频播放器在范围内检测范围内的范围,正如您将使用墙壁和其他物体的山脉使用射线检查并维护可见播放器列表一样,以后您想在此系统上构建可见的玩家然后,您可以从不可访问的播放器中禁用渲染组件。
About the shadows in unity2d, they are pretty buggy and you won't get your desired results from them, as later down the line you may encounter issues where there would be no going back,
Here's a link for a cone vision-based system you can go with this approach this is more similar to among US
https://youtu.be/CSeUMTaNFYk
I would recommend using a raycast system to detect the visible player in the range, as you would be using colliders for walls and other objects you can perform a ray cast check and maintain a list of visible players, that way later down the line is you want to build upon this system you would have access to all those visible players and then you can disable the render component from the non-visible player.