#Grey screen while changing scene

1 messages · Page 1 of 1 (latest)

hardy aurora
#

When ever the change scene is triggered it flashs a grey screen for few frame before loading

so basically

scene 1
grey flash
scene2

relavent code:

@onready var boss_arena: PackedScene = preload("res://scenes/eye_arena.tscn")

func _tarnsition_to_boss() -> void:
    $AnimationPlayer.play("fade out")
    await get_tree().create_timer(0.5).timeout #exact time of animation
    get_tree().change_scene_to_packed(boss_arena)

func _on_player_interact():
    # Trigger boss transition if interacting with gate
    if GameManager.active_obj.is_in_group("gate"):
        _tarnsition_to_boss()

GODOT 4.4

warm fossil
#

im pretty sure thats because theres a minor loadtime when changing to the scene. so basically for a few frames your game has nothing in the scene tree meaning that the color now isnt black but rather the color of the background

one way to fix this would be to make a autoload transition_handler.tscn.

this node would be there at all times even when your scene is changing meaning itll be there when theres nothing. so it can cover the screen when that gray flash happens

hardy aurora
warm fossil