コミュニティQ&A

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

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

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

0 支持
Hi!
I'm using the SetMultiplePositions function, but It's only getting the last position from the array.
That's the code I have

AKRESULT success = AK::SoundEngine::SetMultiplePositions(
            staticObj.getId(), //id of the object within wwise
            staticObj.getPositions().data(), //getPositions() returns an std::vector. this converts std::vector to array
            staticObj.getPositions().size(), //number of positions passed within the array
            AK::SoundEngine::MultiPositionType::MultiPositionType_MultiDirections
            );

Does anyone have this problem too? Am I doing anything wrong?
M.Bruno R. (300 ポイント) General Discussion
Did you manage to find a solution for this, we're having a similar issue where the event only plays on the root object. Here's the code, would be great if someone could look at it.

        //River to array
        AkPositionArray arr = new AkPositionArray((uint)river.transform.childCount);
        foreach( Transform child in river.transform) {
            Vector3 pos = child.position;
            Vector3 forw = child.forward;
            Vector3 up = child.up;
            arr.Add(pos, forw, up);
        }
        AkSoundEngine.SetMultiplePositions(river,arr, (ushort)river.transform.childCount, MultiPositionType.MultiPositionType_MultiSources);
        AkSoundEngine.PostEvent("ambient_river", river);
Hi! Honestly, I can't remember. This was year and half ago. I can check the code (I still have it) and see what I did to solve this (if I did).
Do you still need it?
Hi, thanks for the reply. I eventually managed to solve this issue :)
Hi! I just checked and we didn't solve it, we did a workaround. If you can, please, post your solution.
Thank you!

回答 1

+1 支持

I don't know if it still might help, but i've been trying to set the multiposition mode using code as well, and I managed to do it. 
I've checked the code of AkAmbient.cs (Unity) and I noticed that, before setting the multiposition mode for a gameobject, all components of type "AkGameObj" are removed.

AkGameObj[] gameObj = soundpoint.gameObject.GetComponents<AkGameObj>();
for (int i = 0; i < gameObj.Length; i++)
    gameObj[i].enabled = false;

I added this portion of code in my soundmanager, before setting the multiposition mode, and now it works :) 

 

Slimane D. (170 ポイント)
...