Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by andaleeni · Oct 04, 2011 at 12:41 PM · audiomaterialsfootsteps

Different Surface Footstep Sounds Whilst using W and E keys for footstep input

Hi, My current setup in my level is for the player to use either the W or E keys for forward input. I currently have two scripts one for the Left Foot (W Key) and one for the right foot (E Key) Which basically say if the key is pressed then play an audio clip. I then have my player object set-up in a hierarchy with the main camera parenting a game object. The game object contains an audio source and the left and right footstep scripts when pressing W or E keys. The reasoning for this setup is because I am using Kinect with this.

My question is how do I get the Left and Right footstep keys to play different sounds in different areas? At the moment they have only one audio attached to each script. How would I make it so I can change the audio clip these play in different trigger areas e.g. if you want a section to sound like shallow water play a splashing footstep on either script?

Quite new with Unity so detailed explanations would be magnificent!

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by snagglepuss · Jan 08, 2012 at 07:07 PM

I would use tags to trigger different sounds for your footsteps in different triggerzones. I can give you a more detailed explanation if needed.

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 andaleeni · Feb 21, 2012 at 12:11 PM

I got around this problem using the lerpz tutorial to a degree, so I made a foot object as a spherical rigid body collider, animated it to go up and down to simulate a footstep then used the lerpz script on the foot to say if foot collides with floor then playback the sound located on the floor. The surfaces are all assigned a soundclip which return on collision with foot object. I also made a feel script using the same method virtually allowing players to feel a wall.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

What's the easiest way of changing footsteps sound depending on floor material? 3 Answers

Switch Audio on Different surfaces 0 Answers

AngryBots MaterialImpactManager Script and FootstepsAudio 1 Answer

audio.clip Messing with Other Audio Clips? 0 Answers

Multi-Surface footsteps with FPSController 0 Answers


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