Skip to content

PxContactPoint confusion #389

Answered by vreutskyy
limpan73 asked this question in Q&A
Apr 4, 2025 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

Hi Linus,

Sure, launching a shader for every raycast won't be efficient. But you don't really need a custom geometry to cast rays. While PhysX's custom geometry has callbacks for scene queries (raycast, sweep, overlap), its main purpose is to pass user-generated contact info to PhysX's contact solver. The scene query callbacks are there only for convenience. If all you need is raycasting, you can just use your own PhysX-independent implementation with batching for better efficiency.

As for the contact generation: instead of launching the contact-generating shader for each colliding pair in the generateContacts() callback, you could compute all the contact info before (or simultaneously) w…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

Comment options

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

Answer selected by limpan73
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