0 votes

So I can make what I want work with a MeshInstance.show() and MeshInstance.hide(). I was wondering if there was a way to fade the show and hide in and out. I've been playing with tweening without much luck. Can someone give me an example of tween between show() and hide() or with opacity somehow.

in Engine by (60 points)
retagged by

1 Answer

0 votes

In 3D you cannot easily access opacity, you have to make a simple shader and animate the shader properties.

These are two example youtube video on how to use shaders, one of them is using visual scripting and the other one through code.

https://www.youtube.com/watch?v=sf_Dc4ew3eM
https://www.youtube.com/watch?v=1zvI-QOwny4&t=1516s

You can then animate the shader property using tween to control this effect from code.

by (96 points)
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 Frequently asked questions and 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 [email protected] with your username.