Fix collision behaviours#111
Merged
Merged
Conversation
aaravpandya
commented
May 9, 2024
| void collisionDetectionSystem(Engine &ctx, | ||
| const CandidateCollision &candidateCollision) { | ||
|
|
||
| // Technically there would never be a collision between (non valid expert) and (non expert). So one of the below checks would always be false. |
Collaborator
Author
There was a problem hiding this comment.
Emphasis on NON VALID expert here.
| if(e.data().params.collisionBehaviour == CollisionBehaviour::AgentStop) { | ||
| velocity.linear.x = 0; | ||
| velocity.linear.y = 0; | ||
| velocity.linear.z = fminf(velocity.linear.z, 0); |
Contributor
There was a problem hiding this comment.
why would we want to possibly return negative z velocity?
eugenevinitsky
approved these changes
May 10, 2024
eugenevinitsky
left a comment
Contributor
There was a problem hiding this comment.
LGTM except for comment!
wangbingke0
pushed a commit
to wangbingke0/gpudrive
that referenced
this pull request
Feb 13, 2026
* init * Make vel zero on agent stop * Make sure info is updated * Dont allow negative z vel
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.
This PR intends to ignore collisions when objects are teleported away and they are NON VALID EXPERTS. That is they are not padding entities or teleported away because of prior collision.
Also, smaller changes included here adds a return statement to the teleport condition and zeroes out the velocity of the agent in the agent stop condition (This happens anyways due to the zerovel system but is now explicitly done.)
Also, adds a small condition to the info tensor if its not updated in the tracking system.