I’m currently attempting to create a procedural ambience system using Wwise. My goal is to have multiple line traces which I can use to determine the amount of space around the player and roughly calculate the size of the room the player is in and use this to drive an Real Time Parameter Control in Wwise which I can use to drive/change the ambience/Reverbs depending on the size of the room.
The attached screenshot is the trace which is working successfully and if I attach a print string to the distance on the Break Hit result it gives me the results from each trace (4 values in total). I however need a single value to drive the RTPC, So I was thinking that it would be best to get an average of the 4 values and send that to WWise.
Can anyone help point me in the direction of how to calculate an average value of these results and add it to those script? Any help would be very much appreciated!
i think i could get what i need by just adding together the distances and inverting that number, but whenever i add it just keeps adding indefinitely as it doesn’t know how many indexes are in each sum
i can see the individual distance hits, but can’t get them separately or add them properly
regarding post2 - if anyone knows why the Average variable constantly slowly fluctuates even though the 4 hit distances update immediately I’d be super grateful!
also when i print array to screen it just keeps increasing