Skip to content

How to get CollidablePair (CollidableReferences) from CollisionQuery result? #137

Answered by RossNordby
asimplestd asked this question in Q&A
Discussion options

You must be logged in to vote

When adding a job to the CollisionBatcher, you provide a pairId. When the CollisionBatcher finishes a test, it'll report the results alongside the pairId associated with the test. That can be used to look up other information. The CollisionBatcher is otherwise blind to concepts like collidables and collidable references.

Often, this will look like setting up a list of the stuff you want to look up while you're adding tests to the collision batcher. In the CollisionQueryDemo, this is the queryWasTouched buffer used to color the shapes, but it could contain any data.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@asimplestd
Comment options

Answer selected by asimplestd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants