Add Context to AnyCollider#665
Merged
Merged
Conversation
379468d to
6e6a736
Compare
Co-authored-by: Gijs de Jong <14833076+oxkitsune@users.noreply.github.com> Co-authored-by: aecsocket <aecsocket@tutanota.com>
6e6a736 to
d983ac4
Compare
Jondolf
reviewed
Mar 19, 2025
Jondolf
left a comment
Member
There was a problem hiding this comment.
Looks pretty good, mainly a few stylistic nits and documentation suggestions.
Just to be sure, I'll test later today if this has any measurable perf impact in the default case of an empty context, but I assume it should be basically zero-cost.
Jondolf
approved these changes
Mar 20, 2025
Jondolf
left a comment
Member
There was a problem hiding this comment.
Looks good now! Thanks for the patience on this @NiseVoid and @oxkitsune, I've kept the collider context work sitting here for too long.
I made a couple more small changes just to clean things up, and also ran a quick test to see if this has any measurable perf impact. I didn't notice anything, so it should be good to go :)
Closed
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.
Objective
Solution
SimpleCollidertrait that works for colliders with no context to shorten function signaturesChangelog
AnyCollider::ContextAnyCollidermethods, allowing data from theWorldto be fetched_with_colliderSimpleCollidertrait has been added to retain the simplified methods for colliders that don't need contextMigration Guide
ContextSystemParam, if this is unnecessary()should be usedAnyCollideron an implementation with()context,SimpleCollidershould be used insteadAnyColliderhave been suffixed with_with_context