Skip to content

Add impact sound effects for physics collisions#6

Open
jdarc wants to merge 1 commit intoKenneyNL:mainfrom
jdarc:feat-collision-audio
Open

Add impact sound effects for physics collisions#6
jdarc wants to merge 1 commit intoKenneyNL:mainfrom
jdarc:feat-collision-audio

Conversation

@jdarc
Copy link

@jdarc jdarc commented Mar 14, 2026

Add impact sound effects for vehicle collisions

Collisions against the vehicle's RigidBody3D now emit an impact sound, adding a tactile feel when hitting barriers.

Technical Changes:

  • Contact Monitoring: Increased max_contacts_reported to 2 to ensure simultaneous hits (e.g., floor and wall) are captured.

  • Dynamic Volume: Altered the linear_db based on impact force so direct hits are louder than skimming ones.

  • Velocity Logic: Calculated impact velocity manually; using the built-in linear_velocity of rigid body caused inconsistent behavior, the orientation of the rigid body with a sphere shape and the orientation of the vehicle nodes are not the same.

@MrMinimal
Copy link
Contributor

Works well!

Where is the impact sound from and what is it's associated license? That has to be mentioned.

@jdarc
Copy link
Author

jdarc commented Mar 16, 2026

Impact sound was extract from https://kenney.nl/assets/impact-sounds.
License: (Creative Commons Zero, CC0)
Specifically impactPlate_medium_003.ogg renamed to impact.ogg
I used these audio files to avoid licensing issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants