Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by GardensTale · May 14, 2012 at 09:18 AM · audioareasourcerolloff

AudioSource from mesh instead of one point

Hello,

I've got a problem using AudioSource. My issue is that it seems to be impossible to have the sound emit from a specifically defined area, like a mesh, rather than one point.

I'll clarify this with an example. I want to make a wall emit a sound with a steep rolloff. Only if someone is close to the wall should the sound be heard, but since it's a long wall, you can stand close to the wall at the far end, but still far from the AudioSource in the middle, so it cannot be heard.

I actually hoped to get the answer from the (apparantly outdated) Lerpz tutorial, since it has the impound fence that emits a sound, but the same problem appears. I'd rather not attach twelve audiosources to try and somewhat evenly distribute the sound.

Does anyone have a solution I've overlooked? Maybe something like the AudioSource following the player or some neat trick like that?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image syclamoth · May 14, 2012 at 09:20 AM 0
Share

You'll have to trick it out by moving the audiosource. I would try something like a custom rolloff based on your distance from the wall, but that wouldn't manage distance, so you'll just have to do it the hard way.

Or, alternatively, you could place the audiosource an unrealistic distance away (so that it is at almost infinity), and set up the falloff so that it works perfectly specifically when the player walks near that wall? You'd have to manually turn off the sound when the player walks closer to it (around the wall), of course.

avatar image Ravenmore · May 14, 2012 at 09:23 AM 0
Share

Your last suggestion is worth a try - that's what I'd do.

Let's say the wall's length is in the X axis.

$$anonymous$$ake the audio source match the players' X axis, but limit its movement to the wall length. If the wall is in 0.0 and has a X length of 10, then the audio source moves from -5 to 5. That kind of thing.

If the wall is angled somehow, then it's just a matter of smartly using local vs global coordinates of the player and audio source. =)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DaveA · May 14, 2012 at 10:25 PM

I have what you need I think. Would you like to be a beta tester? Please see: http://qlcomp.com/?page_id=20 and http://forum.unity3d.com/threads/131056-AudioMapping-Demo-online!-(Visual-Audio-Zone-customization)?highlight=visual+audio+zone and http://forum.unity3d.com/threads/129085-Visual-Audio-Zones-needs-testing-feedback

I am almost ready to put a simple free version on the Asset Store, any testing/comments would be appreciated.

In short: you draw where you want sound. Draw it. Like in Photoshop. Or use Lightmaps. And you can use these images to shape more than just loudness.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

AudioSource - Save a Custom Rolloff? 0 Answers

Audio Source Volume not Fading Over Distance 6 Answers

I have a audio source in one scene, I want it to continue when entering next scene 1 Answer

Sound getting deeper 2 Answers

Audio Volume Help 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges