コミュニティQ&A

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

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

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

0 支持
Hi,

I'm working in Unity 5.2.1, Wwise 2015.1.2 on Unity's "Into the Space" Demo project (https://www.assetstore.unity3d.com/en/#!/content/20749).  The game is a basic galaga clone, you control a player ship while enemy ships drop down the screen.

 

I have a space engine sound (Wwise pink noise generator, if it matters) I'm trying to pan based on the position an enemy ship is instantiated on the X-axis.

I've set up a "RedShipPanning" Game Parameter which takes the ship's X-axis coordinate on start (I'll post the code below), this has a min/max value of -6/6 and defaults to zero (based off Unity's coordinates).  This parameter modifies the 2D panning RTPC on the engine sound itself, and does so just fine for a single object on the screen at a time.

 

However when a 2nd red ship is instantiated, the existing RTPC's value changes to match with the new ship's X-axis coordinate instead of having the RTPC act on a per-object basis.  So a ship to the right 3/4 the way down the screen suddenly jumps to the left as a new ship appears on that side at the top of the screen.  Super annoying.  Am I confusing how RTPC's should actually behave?  It's like they're acting as a mix buss instead of an effect on a specific object.

 

Here is the Unity code:

// Use this for initialization
    void Start ()
    {
        GetComponent<Rigidbody2D>().velocity = -1 * transform.up * speed;    //Enemy Ship Movement
        AkSoundEngine.SetRTPCValue ("RedShipPanning", transform.position.x); //Set Wwise's "RedShipPanning" RTPC value based on the ship's initial x-coordinate
    }

 

I have also attempted to add an object ID to the SetRTPCValue code, and this hasn't changed anything.

 

A friend mentioned this might be an issue to the game object being cloned in Unity - but I'm unfamiliar with exactly how that process works and affects Wwise.

 

Halp!  Thanks :)
Adam C. (230 ポイント) General Discussion

回答 1

0 支持

FYI I solved my issue by RTFMing and paying closer attention to MonoDevelop's help dialogues.

AkSoundEngine.SetRTPCValue takes 3 arguments - 1) RTPC name, 2) Value you wish to set, 3) GameObject to set the RTPC on.

In my case, being within the "EnemyRed_Script.cs" file that instantiated the Red Ship game object - my code ended up like this:

AkSoundEngine.SetRTPCValue ("RedShipPanning", transform.position.x, gameObject);

KISS principle ya'll.

 

FYI: If you do not add a valid gameObject in the 3rd argument - the RTPC value defaults globally to ALL gameObjects of said type.  This will cause all sorts of bad wonk, and is what happened to me.

Adam C. (230 ポイント)
...