Repository navigation
Fix EveChildAudio objects not being able to be offset or rotated differently than their parent - #159
Draft
ccp-zoetrope wants to merge 1 commit into
Draft
ccp-zoetrope wants to merge 1 commit into
ccp-zoetrope wants to merge 1 commit into
Conversation
…erently than their parent EveChildAudio had its own copy of m_worldTransform that was never updated, hiding the inherited one. This was removed because it was not possible to move an emitter anywhere but (0,0,0) on it's parent object. - Audio children now follow the object they are attached to, including any offset or rotation set on them or their parent containers.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change to use the inherited world transform for audio emitters.
No open issues 🎉
What changed in this PR
Fixes EveChildAudio positioning and rotation by using the inherited world transform instead of a separate, stale copy.
Changes:
- Removes the shadowing
m_worldTransformmember so audio emitters use the transform updated by their parent hierarchy. - Removes the corresponding constructor initializer.
| File | Description |
|---|---|
trinity/Eve/SpaceObject/Children/EveChildAudio.h |
Removes the duplicate world-transform member. |
trinity/Eve/SpaceObject/Children/EveChildAudio.cpp |
Removes initialization of the deleted member. |
Review effort: Balanced
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.
Summary
EveChildAudio had its own copy of m_worldTransform that was never updated, hiding the inherited one. This was removed because it was not possible to move an emitter anywhere but (0,0,0) on it's parent object.
Linked issue (optional)
Testing
Tested locally in Frontier where I was trying to place an EveChildAudio in the center of two objects using Python. Before this fix it would never move away from (0,0,0) and would keep its default rotation. After this fix it would correctly move where I told it to and would be rotated correctly as well.
AI assistance
Used to diagnose the problem and it pointed me at what to delete.