The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+1 vote

I want that my bots can react to sound emitted by player. How to check is the current bot hear specific sound? Should I create an area for each sound to detect collision with bodies who hear it?

in Engine by (275 points)

Should I create an area for each sound to detect collision with bodies who hear it?

Sounds reasonable. What's bothering you about that approach?

I guess there will be problems with sound refractions.

Also, sound speed is not imminent, so, I should inflate that sphere with some speed.

I asked this question because there can exists more reasonable method and my method can be an inventing of bicycle

You mean... reinventing the wheel? ;D

Sure, if you're going for hyper-realistic gameplay than a simply Area won't be enough! You didn't mention any of that in your original question though. Are you talking about 2D or 3D btw? Personally I'd say that a very rough approximation of realistic sound is usually enough. As long as it feels reasonable, most players will probably be fine with it and won't check if you calculated all the sound refractions correctly. ;)

It's 3D.

Ok, I will try this method.

Sound travels instantly in Godot, so a progressively growing sphere wouldn't reflect that.

Sound travels instantly in Godot

Oh, I didn't know that. Ok. I'll make a sphere with diameter based on loudness.

Please, write this as answer, so, I'll choose it as a best

Please log in or register to answer this question.

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.