커뮤니티 Q&A

Audiokinetic의 커뮤니티 Q&A 포럼에 오신 것을 환영합니다. 이 포럼은 Wwise와 Strata 사용자들이 서로 도움을 주는 곳입니다. Audiokinetic의 직접적인 도움을 얻으려면 지원 티켓 페이지를 사용하세요. 버그를 보고하려면 Audiokinetic 런처에서 Bug Report 옵션을 사용하세요. (Q&A 포럼에 제출된 버그 보고는 거절됩니다. 전용 Bug Report 시스템을 사용하면 보고 내용이 담당자에게 정확히 전달되어 문제 해결 가능성이 크게 높아집니다.)<segment 6493>

빠르고 정확한 답변을 얻으려면 질문을 올릴 때 다음 팁을 참고하세요.

  • 구체적인 내용을 적어주세요: 무엇을 하려는지, 혹은 어떤 특정 문제에 부딪혔는지 설명하세요.
  • 핵심 정보를 포함하세요: Wwise와 게임 엔진 버전, 운영체제 등 관련 정보를 함께 제공하세요.
  • 시도한 방법들을 알려주세요: 문제 해결을 위해 이미 어떤 단계를 시도해봤는지 설명해주세요.
  • 객관적인 사실에 초점을 맞추세요: 문제의 기술적 사실을 중심으로 설명하세요. 문제에 집중할수록 다른 사람들이 더 빠르게 해결책을 찾을 수 있습니다.

0 투표

Hello, I just finished the Wwise tutorial on the website and am trying to practice setting up footsteps with Unity. However I am having trouble to make the surface switches work. 

I'm using the John Lemon game as practice project, and I'm trying to set up footstep switches to respond to the different surfaces he is walking on (wood, carpet, etc.). 

 

What I've done so far:

1. Added a PostWwiseEvent script to the player character John Lemon.

public class PostWwiseEvent : MonoBehaviour
{
    public AK.Wwise.Event MyEvent;
    // Start is called before the first frame update
    public void PlayFootstepSound()
    {
   
        MyEvent.Post(gameObject);   
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

 

2. Attached events and assigned PlayFootstepSound() to John Lemon's walking animation.

3. Added colliders to the carpets/rugs on the map, added components to each of them: 2 AkSwitch (Trigger on Enter and Exit), Ak Trigger Enter, and Ak Trigger Exit.

--Is Trigger is checked; Switch is set to my surface switches in Wwise; Trigger Object is set to John Lemon.

 

However, when I test play, only the default footstep (wood) sound would play. I connected to the profiler and saw only 2 entries related to switch at the beginning:

    Timestamp    Type    Description    Object Name    Game Object Name    Object ID    Game Object ID    Scope

    0:00:14.229    Switch    Switch to "Carpet"    Surface    JohnLemon    1834394558    18030    Game Object

    0:00:15.189    Switch    Switch to "Wood"    Surface    JohnLemon    1834394558    18030    Game Object
 

 

I think I'm missing something to tell Unity to get the switch value, but I don't know how to do that. 

Could someone help me? I've been looking all over for this, and tried to follow some tutorial videos but none has worked so far.

Thank you very much. 

 

 

 

 

 

 

 

폐쇄 기록: In the end (out of frustration), I deleted everything and reset the cube colliders, somehow it is working now!
General Discussion C.c. (100 포인트) 로 부터
완료 Mads Maretty (Audiokinetic) 로 부터

1 답변

0 투표

Hi Cc, 

Did you ensure that the Switch + Event is posted on the same game object? What game object does it show in the Capture log for posting the Event? 

If that doesn't reveal the problem, maybe you could try creating new script on the trigger with a OnTriggerEnter function and set the Switch from there. Something like...

private void OnTriggerEnter(Collider other){
    if (other.gameObject.CompareTag("Trigger")){
        // Set switch
        Debug.Log("Switch set");
    }
}

That way, you can use prints (or debug.log) to see how far the call gets whenever something enters the trigger. 

Mads Maretty S. (Audiokinetic) (40.2k 포인트) 로 부터
Hi Mads, thank you so much for responding.

I'm still not sure what went wrong, but to answer your question, both the switch and event were posted on the same game object (John Lemon) in the Capture Log. It was not switching during gameplay and the messages seem to only appear in the beginning.

I tried adding the script as you suggested (on the carpet), same problem persists except that the switches were posted on transport/soundcaster instead.

In the end (out of frustration), I deleted everything and reset the cube colliders, somehow it is working now!

Anyway, thanks again for your time and help!
Glad to hear it Cc. Let us know if you get the same problem or figure out what the problem was.
...