Use affine transformations for low-level movement logic #716
+239
−325
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.
Describe in detail what your pull request accomplishes
This is the first in a (hopefully) series of PRs to converge Movecraft's translation and rotation systems by leveraging affine transformations. Affine transforms offer the ability to concisely represent these operations as a singular composable unit, which makes implementing code using them much simpler than our current methodologies.
One caveat is that the current implementation uses workarounds to decompose the transformations into its component parts (translation and rotation - in general there's also scaling for example). We have no use for more complex operations so they are left out.
To better support this system, it may be desirable to pre-bake the vector representation of our
MovecraftLocation
into the location objects - this will require performance testing.Checklist