I know that the progress bars value is a float going from 0 to 1 I have an item pickup that fills this progress bar but I have a cap on the items at 30 so it only fills the bar partially, how do I make it so thirty will fill the bar entirely?
Use the Map RangeClamped node.
- Value - Current number of your picked up items (0 to 30)
- In Range A - Minimum pick up items (0)
- In Range A - Maximum pick up items (30)
- Out Range A - Minimum progress bar value (0)
- Out Range B - Maximum progress bar value (1)
Use the following values:
- Value - Current number of your picked up items
- In Range A - 0.0
- In Range A - 30.0
- Out Range A - 0.0
- Out Range B - 1.0
Depending on your Value (ranges from 0 to 30) this will convert the output to range value of 0.0 and 1.0.
Thanks for the help!
theres also the normalize to range node which is a little bit simpler. Or theres always normal math where you would take your current value and divide it by the max which will give you a 0-1 number.