unity3d添加碰撞效果_Unity 3D:在游戏中添加声音效果

unity3d添加碰撞效果

Audio is quite an interesting concept to cover, not only in game design but when studying its nature in general. The way it's perceived depends on a lot of factors, which have to be taken into account when you're trying to control or use it.

音频不仅在游戏设计中,而且在研究其本质时,都是一个非常有趣的概念。 感知方式取决于许多因素,在您尝试控制或使用它时必须考虑这些因素。

Perception of audio generally involves the position of the source and how fast it's moving if it's moving at all (If you've studied Physics, you may be familiar with the Doppler Effect).

音频的感知通常涉及源的位置以及源的移动速度(如果已经移动的话)(如果您已经学习过物理,则可能对多普勒效应很熟悉)。

In Unity, the positioning of a source of audio is important to characterize its source. For example, we need to make sure that a gameObject playing the sound of a waterfall matches with an actual waterfall gameObject, and that the player's perception of that sound feels real. Getting louder as the player gets closer, making sure the audio panning varies as the relative position of the waterfall changes with respect to the player, and so on.

在Unity中, 音频源定位对于表征其源很重要。 例如,我们需要确保播放瀑布声的gameObject与实际的瀑布gameObject匹配,并且玩家对声音的感觉是真实的。 随着播放器靠近,声音会变大,请确保音频平移随瀑布相对于播放器的相对位置的变化而变化,依此类推。

We deal with 2 main components related to Audio in Unity, they are:

我们处理与Unity中的音频相关的2个主要组件,它们是:

  1. Audio Listener

    音频听众

  2. Audio Source

    音源

Let's have a look at these components.

让我们看一下这些组件。

音频听众 (Audio Listener)

This is a component that's automatically attached to the main camera every time you create a scene. It doesn't have any properties, since its only job is to act as the point of perception. Leaving the Audio Listener as it is, is recommended.

每次创建场景时,此组件都会自动附加到主摄像机。 它没有任何属性,因为它的唯一工作就是充当感知点 。 建议保留音频侦听器原样。

音源 (Audio Source

  • 3
    点赞
  • 36
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值