Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

0 votes
By some reason the float is not setting the RTPC value, I tried the code in a different version of wwise and it seems that it is not working on wwise 2021.1.2
in General Discussion by Octavio B. (100 points)

1 Answer

0 votes

Hi Octavio, 

Thanks for letting us know. I just tested it myself but I don't seem to have any problems using Wwise-types to set RTPCs. 
If the problem persists, please use the Bug Reporter located in the Wwise Launcher which should ask you for relevant information needed to identify the problem. 

by Mads Maretty S. (Audiokinetic) (39.8k points)
What am I doing wrong? I am calculating the distance of the object and I am using that float to set that value to the parameter, however it doesn´t work, The distance is being calculated but it doesn´t change the parameter

 [SerializeField] AK.Wwise.RTPC myDistanceParameter;
    [SerializeField] float distance;
    [SerializeField] GameObject player;
    [SerializeField] GameObject audioParameter;
    
    
    void FixedUpdate()
    {
        if (player == null)
        {
            PlayerCheck();

        }
        else PlayerDistance();

    }

   
    


    void PlayerCheck()
    {

        player = GameObject.FindGameObjectWithTag("Player");


    }

    void PlayerDistance()
    {
        distance = Vector3.Distance(gameObject.transform.position, player.transform.position);
        myDistanceParameter.SetValue(audioParameter, distance);



    }
...