vlad2305m / Sound-Physics-Fabric

A Minecraft mod that provides realistic sound attenuation, reverberation, and absorption through blocks.
GNU General Public License v3.0
39 stars 6 forks source link

All Mob sounds other than footsteps have an inaccurate origin #13

Closed thedocruby closed 2 years ago

thedocruby commented 2 years ago

All sounds that mobs make I believe have the coordinates of origin set to the mob's origin, i.e. at their feet. It would be nice to have a part of the code that adjusted the coordinates used for rendering based on what sound is made and what mob made it. For example, footsteps would receive no change, while grunts and groans and snorts and laughs and other things would be adjusted to that specific mob's eye level, to keep things from getting too complicated or having to hardcode all the mouth heights. That being said, I am not even sure that data about the mob that made the sound is available to the renderer in the first place, so this may not be feasible for you. But if it is, it would be a nice touch to fetch the eye level of the mob when it makes a mouth sound and adjust the origin to that. That way, Mr. Zombie here won't sound so muffled and distant when he pops up to say hi: 2021-12-02_13 13 24 (in all seriousness, this bug does have some implications for combat, especially in hilly terrain or caves, where a mob a few blocks behind you might sound distant, even in another cave, if there is a block between you and it's feet. This gives a false sense of security that is not present in an analogous vanilla scenario)

vlad2305m commented 2 years ago

@thedocruby, I strongly believe I already do so in https://github.com/vlad2305m/Sound-Physics-Fabric/blob/master/src/main/java/com/sonicether/soundphysics/mixin/EntityMixin.java

I'll try to include more debugging tools later, but perhaps GeneralLogging tells you where the sound is at, so in void superflat it is very easy to see that everything is working properly (unless you are playing on a server without this mod installed serverside)

Take care

vlad2305m commented 2 years ago

Rays do have accurate origin. See 3.0.0 with ray particles on (carpet /tick freeze advised as there are way too many rays otherwise)

thedocruby commented 2 years ago

(unless you are playing on a server without this mod installed serverside)

Ah, i did not realize that this was not a client side exclusive mod. That is my bad, thanks for clearing that up!

vlad2305m commented 2 years ago

It's the little things )