• 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
3
Question by Digital-Phantom · Jan 04, 2015 at 03:43 PM · positionaudiosourceparentcomponent

Can you set a component (audio source) position manually

I'm trying to add audio components to various game objects but the component is not being centred on the object itself? All of the game objects consist of parent/child objects with the audio source being on the parent. In some cases the audio source is being placed 3-4 units away from object its supposed to be attached to?

Any ideas how I can remedy this ???

Comment
Add comment · Show 1
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 gregroberts · Apr 22, 2015 at 12:44 PM 0
Share

I have this exact same problem. It appears that even though the parent object which the AudioSource is attached to is properly zeroed (XYZ 0,0,0), a few of the children and grandchildren have funky offsets, and the AudioSource is somehow averaging the offsets of the combined entity, resulting in an AS that is 2m back and 4m right of the object origin. :( Obviously, rebuilding works, but I too would prefer a manual shortcut to reposition the AS much as one can manually adjust positioning on a Box Collider.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Digital-Phantom · Jan 05, 2015 at 02:21 PM

Anybody?

Not the biggest hardship but may just rebuild my gameObjects to make sure they are all centred. Would still be nice though to figure out why things are being added at an offset ?

:/

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
avatar image
0

Answer by isbjorn · Feb 17, 2017 at 06:11 PM

As outlined in comments in this thread a solution can be to first assign a child object:

Right click (on Game Object) -> 3D object -> Cube

Make it invisible (by de-selecting Mesh Renderer) and position it freely with respect to its parent. Attach your audio source to the child:

Right click (on Cube) -> Audio -> Audio Source

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

27 People are following this question.

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

Related Questions

Keep instantiated GameObject's position while parenting it to another GameObject 3 Answers

Children Objects move weird 1 Answer

Transform child object over time and then destroy it. 1 Answer

Does enabling and disabling an AudioSource cause the sound to play, if playOnAwake is enabled? 1 Answer

How can I make a First Person Character Controller a child of a moving platform without it affecting the rotation of the Character Controller. 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