entity physics sounds

This has been bothering me for a while and I haven’t found a solution for it yet.

Why doesn’t physics based entities emit collision sounds and effects?
I’ve followed several tutorials how to create lua entities, and none of them gets proper collision sounds.



ENT.Type = "anim"
ENT.PrintName = "Test"
ENT.Author = "Mornedil"
ENT.Spawnable = true
ENT.AdminSpawnable = false



function ENT:Draw()



function ENT:Initialize()
	self:PhysicsInit( SOLID_VPHYSICS )
	self:SetMoveType( MOVETYPE_VPHYSICS )
	self:SetSolid( SOLID_VPHYSICS )

It feels very weird when a huge car entity falls next to me and doesn’t make a sound or shake the view.

You can take example from the sent_ball entity that’s shipped with the game. https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/entities/sent_ball.lua#L98-L106

As for shaking the view, you could call this

util.ScreenShake in the same function as above.

The source engine already has built in that different type of materials (metal, wood, etc) make different sounds upon collision, so it seems like there should be a way to tell the physics engine that “hey, this is a huge metal prop, do your thing…”
It seems pretty unnecessary to try to recreate functionality that’s already there, instead of trying to access it somehow.
For example, these type of entities already emit proper physics “scrape” sounds when they drag along the ground, so there must be a way to tell it to emit physics collision sounds.

Well, it’s strange if there isn’t a way to use the model’s default prop data for this…
But I’ve tried spawning multiple downloaded entities, and they all seem to have this problem.
Biggest issue with my entity is that it can be different models, so I guess I’ll have to make tables containing collision sounds for every type of material