0 votes

Hello,

I have a problem with a simple thing, but I can't figure out how to fix it.
I'm making a visual novel and i want to have a transition between scenes (fade in/out).

Currently I have three scenes:

VisualNovel.tscn --> Main scene
Scena2.tscn--> scene i want to call
global.tscn --> transition scene

global.tscn is quite simple, it has a canvas layer, colorRect and animationPlayer.
I made a simple animation to switch from trasparent to color (using Alpha).

global.tscn has a simple script that i've found in this video

Then, in project --> autoload i load global.tscn.

So theoretically when I click a button it would switch to scene2 with a fade effect. The problem is that it doesn't recognize any inputs. I'm making an android app and handling input with "unhandledinput(event)" function and it works perfect until i load , in (project-->)autoload section, global.tscn.

it is as if loading the autoload prevents any input, both as a mouse and as a touch.

What i'm doing wrong?

P.S: I downloaded the project from the video and it works perfectly.

Thanks for your time.

Godot version 3.3
in Engine by (15 points)

1 Answer

+1 vote
Best answer

I believe whatever you are using to fade, probably a colorrect, is blocking the inputs. A solution would be either to move it after it's faded in and then move it back when its done.

func _on_AnimationPlayer_animation_finished(anim_name):
#1000 or some other big number
    $Colorrect.position.y = 1000
#Put the following wherever you start your animation
$Colorrect.position.x = 0
#the return position should be whatever you currently have it as

Another option I am not totally sure about is just hiding the node

func _on_AnimationPlayer_animation_finished(anim_name):
    $Colorrect.hide()
#Put the following wherever you start your animation
$Colorrect.show()

There are other and maybe better options but these are the ones I know about

by (125 points)
selected by

You're absolutly right.

I found a quicker solution, in color rect filter (input --> mouse) just select "ignore". Default selection is "stop" and this causes the problem.

The guy in the video, in the end he recommends to fix the mouse filter, but I didn't give importance because I have touch input ..

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.