0 votes

Hello,

I am wondering if there is a way to make a "sonar-like" effect in a 2d game. For instance, if you are looking at the Flappy Bird demo game and the bird could send out a "pulse" that highlighted the edges of the pipes in front of it. I was hoping that this is something that could be done programatically instead of having to craftily weave together sprites in some cool way.

If anyone has any ideas, please pass them along!

Judd

in Engine by (41 points)

1 Answer

0 votes

You can create a "sonar pulse" by a set of images and animate them inside a light mask. Of course, the objects to be discovered by the sonar pulse must have its corresponding light occluders.

I don't think it could be done in a more programatically way

by (677 points)

Could be interesting to combine this with raycasts, so you know where the sonar should stop/bounce and what to highlight.

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.

Categories