Double transform fix for modular ships - #99
Open
ccp-intern wants to merge 4 commits into
Open
ccp-intern wants to merge 4 commits into
ccp-intern wants to merge 4 commits into
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
CCPNobody
reviewed
Sep 24, 2026
| elements[0], elements[4], elements[8], 0.0f, elements[1], elements[5], elements[9], 0.0f, elements[2], elements[6], elements[10], 0.0f, elements[3], elements[7], elements[11], 1.0f ); | ||
| } | ||
|
|
||
| bool IsMirrored( const Matrix& m ) |
Member
There was a problem hiding this comment.
don't we need to know where it is mirrored? f.ex couldn't a thing might be mirrored on both the x and y axis?
| return Determinant( m ) < 0.f; | ||
| } | ||
|
|
||
| void DecomposeMirrorAware( Vector3& scale, Quaternion& rotation, Vector3& translation, const Matrix& m, int mirrorAxis ) |
Member
There was a problem hiding this comment.
same thought as above, maybe switch out the mirrorAxis for a vector3 axes that is 1 for unmirrored and -1 for mirrored?
just a thought though...
| Vector3 tmp; | ||
| Matrix m = TransformationMatrix( Vector3( 1.0f, 1.0f, 1.0f ), itemData->rotation, itemData->position + hullOffset ) * offset; | ||
| Decompose( tmp, spriteLineSetItem->m_rotation, spriteLineSetItem->m_position, m ); | ||
| DecomposeMirrorAware( tmp, spriteLineSetItem->m_rotation, spriteLineSetItem->m_position, m, 1 ); |
Member
There was a problem hiding this comment.
why hardcoded to y and everything else is hardcoded to x?
Is there some logic that I'm missing?
| if( m_boostersVisible ) | ||
| { | ||
| auto& indexBuffer = Tr2Renderer::GetQuadListIndexBuffer(); | ||
| auto& indexBuffer = m_parentMirrored ? Tr2Renderer::GetReversedQuadListIndexBuffer() : Tr2Renderer::GetQuadListIndexBuffer(); |
Member
There was a problem hiding this comment.
are you sure that this is needed? does it matter if the quad is on a mirrored parent visually that is?
|
|
||
| // And last but not least! AUDIO! | ||
| SetupAudio( BlueCastPtr( placementContainer ), dna, transform ); | ||
| SetupAudio( BlueCastPtr( placementContainer ), dna, IdentityMatrix() ); |
Member
There was a problem hiding this comment.
won't this break for nested layouts?
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.
https://fenriscreations.atlassian.net/browse/PLAT-12078
Fixed the issue: Modular ships build with EveSOF::BuildChild apply transformations twice to attachments, effect children, nested layouts and audio.
Last commit only. The other changes are part of #93