Report collider parts in OnSeparate, return void from OnSeparate and OnCollide #1
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.
Discord discussion link: https://discord.com/channels/522167736823185418/721593711204630580/1119649574043267154
I did not include the position or normal arguments for
OnSeparate
because they are set to zero length vectors in the existing physics plugin. I'm happy to add those if you'd prefer for future proofing.From the commit message:
Reporting collider parts in OnSeparate allows objects to track which parts they lose contact with for a specific object. An example of where this may be useful is detecting when separation occurs with a non-solid sensor part versus a solid body part.
OnSeparate and OnCollide used to return orxBOOL as way to prevent the other collider's callback from being called. However the callback order can not be controlled from orx so this simplifies the API by changing the return value from orxBOOL to void. With this change both colliders, if they are Scroll objects, will have their OnSeparate and OnCollide callbacks called.