#Progress bar refresh issues
1 messages · Page 1 of 1 (latest)
Me neither
is that the only place you set something with the combo meter
What sets draining_combo?
When the player gets a point that variable is set to true
It doesn't turn off yet
Wdym
@onready var progress_bar: ProgressBar = $ProgressBar
var actual_value : float
func _ready() -> void:
pass
func _process(delta: float) -> void:
actual_value += 1 * delta
progress_bar.value = lerp(progress_bar.value, actual_value, 5 * delta)
tjis is what i did
this works fine for me
Something to keep in mind, this is going down by 0.5 per frame.
That means it goes down by 30 per second at 60 FPS.
The speed is dependant on frame rate as it stands.
yeah have to * delta
wait, why lerp()?
@turbid rune
Ill try that
It didn't worked
Ill send a video hold on
i mean its going down
but very slowly
make the actual_progress bigger like make it 5 * delta
also in your progress bar change step back to 0.01
The value is smooth , bur the progress bar isn't going down as smooth as the numbers
i dont get it
thats weird
did you change step in the progress bar node
change it back to 0.01
and its still going down in jumps
Yeah :/
Let's see if someone else has any ideas
If I don't find any solutions im reporting that to the bug channel
I'd try to isolate the whole progressbar, or recreate the progressbar code in a new scene with simpler scripts, and test just that, to see if it is not something else in the other scenes that is causing issues
I did a very simple scene test and the progress looks smooth
Code:
extends Node3D
var value = 100.0 # holds the value that will be assigned tothe bar. Not required, but it's just for the test
const FACTOR = 10.0 # just a fixed factor to simplify things
@onready var combo_meter: ProgressBar = $CanvasLayer/combo_meter
func _ready() -> void:
combo_meter.value = value # starts the bar full
func _process(_delta: float) -> void:
if (Input.is_action_pressed("ui_left")): # if left arrow is being held down
value -= (FACTOR * _delta) # decreases value
combo_meter.value = value # updates the bar value
It only looks choppy if the step is too high (10, for example), because then Godot will only update the bar when the value is rounded to the required step
Ill check it out hold on
Also failed in a completly empty scene
I copy pasted the code and xonnected everything the right way
It runs fine , and the debug cod successfully flags that the input key is pressed and prints the combo_meter.value
You're running Godot on Android? @quaint creek
Sorry if I missed that, my test was in Windows
It's alright
I also asked that because it might be something that only happens when running on Android, so you might want to add that information if you open an issue
Where can I open an issue?
At #🐞┃is-this-a-godot-bug ?
is-this-a-bug is for discussing if something is a bug before opening an issue. You can ask there again and give more info, linking this thread, and more people can see if they have any idea if something is a bug or not
The issues itself you would open on Github https://github.com/godotengine/godot/issues , but only after testing a lot, and searching to see if there's no similar issue already open