Correct offset for ship spawned aircraft#752
Open
maxrwalker wants to merge 1 commit intoOpenRA:masterfrom
Open
Correct offset for ship spawned aircraft#752maxrwalker wants to merge 1 commit intoOpenRA:masterfrom
maxrwalker wants to merge 1 commit intoOpenRA:masterfrom
Conversation
Author
|
BTW - I saw the comment about the Exit trait needing modification - but I think this works? |
maxrwalker
commented
Nov 16, 2020
| var spawnOffset = exit == null ? WVec.Zero : exit.Info.SpawnOffset; | ||
| var spawnOffset = WVec.Zero; | ||
| if (exit != null) | ||
| spawnOffset = exit.Info.SpawnOffset.Rotate(new WRot(WAngle.Zero, WAngle.Zero, WAngle.FromFacing(64 - facing.Facing))); |
Author
There was a problem hiding this comment.
I could move this to the Exit trait as that appears to maintain the facing?
Member
There was a problem hiding this comment.
I think that would indeed be better. Where is the magic 64 - coming from?
Member
There was a problem hiding this comment.
I can confirm that this also works in a 2D plane with only sprites. Just had to change offset from -250 to 250 so the minus sign may be "wrong" compared to Armament LocalOffset from a regular bullet.
Member
|
@maxrwalker would you please address abcdefg30's comment so that we can move forward with this PR? |
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.
Rotated the offset vector of the child (plane) by the facing of the parent (ship) Closes #719