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

keep CollisionInfo.has_collided flag set until simGetCollisionInfo called #4237

Merged
merged 3 commits into from
Jan 11, 2022

Conversation

zimmy87
Copy link
Contributor

@zimmy87 zimmy87 commented Dec 22, 2021

Fixes: #1004

About

This adds a new method to PawnSimApi called getCollisionInfoAndReset() which both returns collision info as well as reset the has_collided flag. The old behavior for resetting CollisionInfo.has_collided after every clock tick has been removed and simGetCollisionInfo now calls getCollisionInfoAndReset(), which means this method will return whether any collision has occurred since last call to simGetCollisionInfo instead of only within the last clock tick.

How Has This Been Tested?

Collisions were tested in the Blocks environment with the EnableCollisionPassthrogh parameter set to both true and false.

Screenshots (if appropriate):

new method added in PawnSimApi to both return collision info as well as reset the has_collided flag
@jonyMarino
Copy link
Collaborator

Thanks, @zimmy87!

@jonyMarino jonyMarino merged commit c23a3a5 into microsoft:master Jan 11, 2022
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.

has_collided not updated
2 participants