Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report collider parts in OnSeparate, return void from OnSeparate and OnCollide #1

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

hcarty
Copy link
Member

@hcarty hcarty commented Jun 19, 2023

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.

…eturn void

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.
@iarwain iarwain self-assigned this Jun 20, 2023
@iarwain
Copy link
Contributor

iarwain commented Jun 20, 2023

Perfect, thanks for the changes!

@iarwain iarwain merged commit d68f66c into orx:master Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants