Skip to content

QuadTree stack #1237

Answered by jrouwe
sinkinthesea asked this question in Q&A
Aug 29, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You are triggering an 'assert' which means you're running a debug build and this normally triggers a breakpoint in the debugger. You should be able to continue after hitting the breakpoint, the code is guarded and won't crash (if it does then something is wrong in the C# bindings). Release builds don't trigger the assert. The only thing that will happen is that your raycast potentially misses collisions.

What probably happened is that you are adding a lot of bodies through BodyInterface::AddBody creating a very unbalanced broad phase tree. Try to batch add bodies using BodyInterface::AddBodiesPrepare followed by BodyInterface::AddBodiesFinalize or alternatively calling PhysicsSystem::Opti…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by sinkinthesea
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
Converted from issue

This discussion was converted from issue #1235 on August 30, 2024 12:00.