cat, sheep: Fix meow/baa position - #2730
Merged
Merged
Conversation
Previously the AudioStreamPlayer2D was a child of a `Node` (not `Node2D`). `Node`s do not have a position in the 2D scene, so the resulting position of the AudioStreamPlayer2D was (0, 0). The AudioStreamPlayer2D is set to attenuate over 2000px of distance so if the cat/sheep was more than 2000px from the (0, 0) position of the scene, its sound would be completely inaudible, and before that it would be quieter. We never noticed this before because the sheep and cat happen to be close to the origin of the scene! However it was noticeable on the new enemy interaction island in Dev Archipelago. Change the structure of each scene so that the AudioStreamPlayer2D node is not a child of the PetInteraction (Node) but of the root (subclass of Node2D).
Member
Author
|
@felixwalberg this fixes the silent sheep you added in #2706 |
|
Play this branch at https://play.threadbare.game/branches/endlessm/wjt/cat-sheep-fix-meow-baa-position/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
manuq
approved these changes
Aug 18, 2026
manuq
left a comment
Collaborator
There was a problem hiding this comment.
Oh good finding! The alternative would be to make PetInteraction a Node2D, but this is better, I think.
| position = Vector2(5, -28) | ||
| shape = SubResource("RectangleShape2D_tsjbs") | ||
| debug_color = Color(0.6290859, 0.52632225, 0.15803415, 0.41960785) | ||
| debug_color = Color(0.6, 0.545, 0, 0.42) |
Contributor
There was a problem hiding this comment.
In my latest PR it had automatically changed to this newer color, but I didn't realize it was intentional, so I reverted it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously the AudioStreamPlayer2D was a child of a
Node(notNode2D).Nodes do not have a position in the 2D scene, so theresulting position of the AudioStreamPlayer2D was (0, 0). The
AudioStreamPlayer2D is set to attenuate over 2000px of distance so if
the cat/sheep was more than 2000px from the (0, 0) position of the
scene, its sound would be completely inaudible, and before that it would
be quieter. We never noticed this before because the sheep and cat
happen to be close to the origin of the scene! However it was noticeable
on the new enemy interaction island in Dev Archipelago.
Change the structure of each scene so that the AudioStreamPlayer2D node
is not a child of the PetInteraction (Node) but of the root (subclass of
Node2D).