fix: Validate translation and rotation data fed to bepu for collidables#3166
Draft
Eideren wants to merge 1 commit into
Draft
fix: Validate translation and rotation data fed to bepu for collidables#3166Eideren wants to merge 1 commit into
Eideren wants to merge 1 commit into
Conversation
2d83bca to
90e4944
Compare
8 tasks
xen2
reviewed
Jun 3, 2026
|
|
||
| ref Matrix4x4 numericMatrix = ref Unsafe.As<Matrix, Matrix4x4>(ref collidable.Entity.Transform.WorldMatrix); // Casting to numerics, stride's equality comparison is ... not great | ||
| if (span[i].Value == numericMatrix) | ||
| if (iData.Value == numericMatrix) |
Member
There was a problem hiding this comment.
Agree with that, we should have real equality comparison (currently EqualsStrict) and have an explicit method for epsilon comparison
(of course, not part of this PR, keep as is)
Member
Automation looks OK, let me know when ready for merge |
|
🤖 Draft PR — automatic CI is skipped to save runner minutes.
Marking ready-for-review re-enables full CI automatically. |
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.
PR Details
Bepu does very little validation on their end; sending nans or zeroed quaternion causes memory corruption, this PR places a couple of exception to notify users of their invalid data.
There's also some very minor cleanup and summaries added in. Haven't had any time to test this yet, but let's see if automation catches anything before I find the time to do so.
Related Issue
fix: #3163
Types of changes
Checklist