You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know it's not common to attach a Control of a PhysicsBody2D, but I have a local HUD displaying life gauge near attached to my CharacterBody2D so it's convenient, and I need to smooth it or it will jitter relatively to my smoother character sprite.
(usually I'd use a Canvas Layer and manually move the gauge to match character, but it's more complex)
When you do so, you get a double assert error on start: _SetProcessing(): Condition "!viewport" is true on set_as_top_level:
Godot code:
func _SetProcessing():
var bEnable = _TestFlags(SF_ENABLED)
if _TestFlags(SF_INVISIBLE):
bEnable =false
set_process(bEnable)
set_physics_process(bEnable)
set_as_top_level(_TestFlags(SF_GLOBAL_OUT)) # here
Indeed, error didn't appear as I was detaching Smoothing Node and reattaching it to an external parent node already in v1.0.3, but I also tested v1.2.1 disabling legacy toplevel and using global out with no Smoothing Node detachment at all, and it also works without error.
I know it's not common to attach a Control of a PhysicsBody2D, but I have a local HUD displaying life gauge near attached to my CharacterBody2D so it's convenient, and I need to smooth it or it will jitter relatively to my smoother character sprite.
(usually I'd use a Canvas Layer and manually move the gauge to match character, but it's more complex)
When you do so, you get a double assert error on start: _SetProcessing(): Condition "!viewport" is true on
set_as_top_level
:Godot code:
Callstack:
(this shows twice)
However, the Control is still smoothed correctly, although set_as_top_level failed, apparently because it's called again later.
The text was updated successfully, but these errors were encountered: