QuadTree stack #1237
-
I'm using jolt physics in a c# environment(Unity), and when i try to call RayCast Function, program crashed, and error is : Stack full. I don't know if i use Api by a wrong way, or is there someting should setting but i didn't set? Or the body in my environment should be less. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
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 usingBodyInterface::AddBodiesPrepare
followed byBodyInterface::AddBodiesFinalize
or alternatively callingPhysicsSystem::Opti…