コミュニティQ&A

Audiokineticのコミュニティ主導のQ&Aフォーラムへようこそ。ここはWwiseとStrataのユーザのみなさまがお互いに協力し合う場です。弊社チームによる直接のサポートをご希望の場合はサポートチケットページをご利用ください。バグを報告するには、Audiokinetic LauncherのBug Reportオプションをご利用ください。(Q&AフォーラムではBug Reportを受け付けておりませんのでご注意ください。専用のBug Reportシステムをご利用いただくことで、バグの報告が適切な担当部門に届き、修正される可能性が高まります。)

最適な回答を迅速に得られるよう、ご質問を投稿される際は以下のヒントをご参考ください。

  • 具体的に示す:何を達成したいのか、またはどんな問題に直面しているのかを具体的に示してください。
  • 重要な詳細情報を含める:Wwiseとゲームエンジンのバージョンやご利用のOSなど詳細情報を記載してください。
  • 試したことを説明する:すでに試してみたトラブルシューティングの手順を教えてください。
  • 事実に焦点を当てる:問題の技術的な事実を記載してください。問題に焦点を当てることで、ほかのユーザのみなさまが解決策を迅速に見つけやすくなります。

0 支持
We're using Unity 5 and TBE 3Dception and would like to know if it's possible to attach a 3D sound to a particle effect.

 

Cheers in advance...
Matt sneakSounds (460 ポイント) General Discussion

回答 1

0 支持
 
ベストアンサー
A particle effect is a component, so it needs to be attached to a GameObject. Simply attach an AkAmbient component to the same GameObject as the particle effect.
Benoit S. (Audiokinetic) (16.0k ポイント)
Benoit S. (Audiokinetic) 選択
Hi Benoit and thanks for the quick response. My bad though, I should have been more specific... I meant is it possible to attach sounds to individual particles? The way we're using the particle system means we have very wide separation on each particle and I'd like to associate a sound with each of the individuals.
Unfortunately, individual particles are not GameObjects in Unity, so the simple answer is no. A quick Google search shows that this is not possible even with the built-in Unity audio.

However, with some scripting, you could achieve something. You have access to each particle's position and rotation (see here: http://docs.unity3d.com/ScriptReference/ParticleSystem.Particle.html ). You could (at init time) create a certain number (say, maxParticles of your Particle System if you want every single particle to play a sound) of empty GameObjects with an AkGameObj component attached to them. When you wish to post an event on a particular particle, you could get the particle's position, move an empty GameObject to that position, and then call AkSoundEngine.PostEvent using that GameObject.

If your sound is short, you don't need to do anything else. The sound will play at the particle's position, and then it's over. But if you want to play longer 3D sounds, you will need to keep updating your empty GameObjects' positions.

Be careful with this, though. If you have a big number of particles in your particle system, this will use a lot of memory and CPU!
Thanks very much for the help, I'll pass the info on to my coder and see wee what we can do.

All the best,
Matt
...