I was trying to follow this tutorial(i have a black image,not the heart image):
https://fede0d.github.io/blog/2016/02/07/Godot-Extra-Tips-2.html#final_result
I have a house, and when i'm near the door, if i'm pressing space it should fade in and out to the living room. Without the transition scene&script, it works well. But after I followed that tutorial, the CanvasLayer is overlapping my scene(it's just black) and when i'm pressing space it changes the scene. So basically I can press anywhere space, not just near the door, and i see black if i'm not doing this. After this, the fading animation and the change of scene work. I think this part of the code is the problem, so I'm gonna leave it here:
extends Area2D
func _ready():
pass
func process(delta):
if Input.isactionpressed("uiaccept"):
if gettree().getcurrentscene().getname() == "home-garden": Transition.fade_to("res://scenes/home-floor1-livingroom.tscn")
func onArea2Dbodyentered(body):
if body.getname() == "Player":
setprocess(true)