[ANSWERED] Scaling & Set/Get Global Values
-
Hello!
I'm trying to use "Get Value" (to create a user actor that fades the sound), and I'm encountering an issue where when I connect "Get Volume" to the volume of the player, it divides the value it receives by two. Why does it do this? If I use the broadcaster/listener pair, it works correctly. What is the reason for this behavior? Thanks in advance for your help.
-
I think it is because you change the maximal value of the volume input in the Movie player to 100 after you had connected the get value actor. the standard volume input is 0 to 200 and by connecting the get value actor this one take the value of the volume input and you get something like this:
If you change the "Scale max" back to 200 in the Movie Player actor or the Scale Max to 100 in the Get global actor you will get the correct value because the value won't be scaled any more from 0-200 to 0-100.
You can also use a Absolute Value actor between both.
Best regards,
Jean-François
-
@jfg said:
Jean-François
Hi Jean-François,
It works! Both solutions are fine! (changing scale max to 100 in the Get global actor or putting an absolute value actor between)
Thanks a lot!
-
It is worth noting that the scaling changes when you connect the value 1 output of the Get Global Values actor to the volume in put of the Sound Player, because the value 1 output is mutable (it will be a green dot), this means it will convert to the data type and scale of the input you connect it to.
The volume input of the Sound Player has a little bit of a unique default setup. It has a minimum value of 0 and a maximum value of 200, but has a Scale Min of 0 and a Scale Max of 100. So the input is being limited to a input range of 0-100, and when the value 1 output is connected to the volume input the range of 0-200 is adopted as the expected range for this output, so for example, a value 1 = 50 (expected range 0-200) will be scaled to fit the Scale range of 0-100 in this case, resulting in 1/2, so 25.
Watch for these green dots, mutable IO is very helpful, but being aware of how it works, can help in cases like this.
-
Thanks for the explanation! What confused me was that it does not work in the same way with Broadcast/Listener actors
Regards!
-
@dusx Thanks ! I never noticed the gree dots (I am ashamed....)