Add basic support for rotation mech#337
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #337 +/- ##
==========================================
+ Coverage 83.43% 83.90% +0.47%
==========================================
Files 125 125
Lines 6736 6734 -2
==========================================
+ Hits 5620 5650 +30
+ Misses 1116 1084 -32
Continue to review full report at Codecov.
|
jsm174
reviewed
Oct 30, 2021
jsm174
approved these changes
Oct 30, 2021
Collaborator
jsm174
left a comment
There was a problem hiding this comment.
Awesome stuff! Looks good.
Reword ambiguous "it" and use consistent formatting for the phrase "Rotator component"
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.
Mechs are a complex topic and this PR starts by splitting the former cannon component in two:
StepRotatorMechComponent, which simulates the mechRotatorComponentwhich applies rotation on the playfield, inclusively balls.The rotator component (documentation) works by introducing a new
IRotatableComponentinterface, which allows setting a z-rotation and retrieving the position on the playfield. One of those is the defined as the "target", and other objects can be added which will rotate around the target. Rotation is applied to the mesh, but also to other relevant attributes like the eject angle for kickers (however, colliders still cannot be moved). Balls in the kickers are correctly rotated as well.It somewhat works now with a cannon, although there are many more changes needed in order to support more generic mechs.
cannontest.mp4
Other Changes
TODO
RotatorComponent