I am currently trying to make a UI widget where a circle will move to a certain point on a bar that is linked to a certain value. I currently have it set up to a normal progress bar, however because they use a value of 0-1, I can’t get the effect i’m after.
There is a variable which holds the max amount of pick-ups in the level, and the current pick-ups that still need collecting. I want each end of the bar to represent the max amount of pick-ups in the level, and the centre of the bar to be 0. As the player moves about the level, more pick-ups may pop up as they are collecting others. The idea is that the bar will slide back and forth between these values, almost like a balance meter and the player is trying to find that sweet spot in the middle.
Hopefully the images below better demonstrate what I mean.
The current bar which is a regular progress bar that depletes as items are collected:
What i’m trying to make: (the player wont be able to see the numbers and the white circle represents the current number of pick-ups left)