Setting the Slider Value with maxPower

The Power Slider fill amount only works properly when the value of the power variable is clamped at 1, because the slider (by default) also uses a normalized value with a minimum of 0 to a maximum of 1.

Since I set my maxPower variable to 3, the bar would fill completely when the bow was only at one third of its possible charge, giving no visual feedback to the player that the charge was still increasing. One way to fix this is to set your Slider’s Max Value to your maxPower value. The other is to normalize the value yourself in the Slider Script Graph, dividing power by maxPower before setting the value. (This does add an extra step, since you’ll need to make maxPower a Scene Variable rather than a Graph Variable.)

Annotation 2023-11-25 012550

1 Like

Privacy & Terms