Skip to content

add a flag first_tick to ContactForceEvent #864

Open
bcolloran wants to merge 3 commits intodimforge:masterfrom
bcolloran:contact_force_event_first_tick
Open

add a flag first_tick to ContactForceEvent #864
bcolloran wants to merge 3 commits intodimforge:masterfrom
bcolloran:contact_force_event_first_tick

Conversation

@bcolloran
Copy link
Copy Markdown

This adds a flag "first_tick" to ContactForceEvent, that is true if this is the first tick on which a contact force has been applied by the corresponding ContactPair.

This seems to be a tidy solution to the issue I described in this discord issue:
https://discord.com/channels/507548572338880513/747935665076830259/1397751543700262934

Please let me know if you have any feedback or suggestions, or if you see anything incorrect. Thanks!

@bcolloran
Copy link
Copy Markdown
Author

Hi @sebcrozet, any chance to get a review on this little teeny change :-)

This is useful for example for playing a sound just once at the moment when a collision starts.

Happy to do the implementation of a different approach if you have another suggested way of doing this!

Thanks much!

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.

1 participant