Skip to content

Question regarding inMaxBodies when initializing the PhysicsSystem #917

Answered by jrouwe
Pindrought asked this question in Q&A
Discussion options

You must be logged in to vote

I am wondering what are the implications of increasing the number here?

Costs more memory (but not a lot).

Also, is there any way to adjust the parameters after the physics system has been initialized or does it need to be completely shut down and reinitialized to do so?

It needs to be shut down completely. The reason for preallocating all of this is that Jolt allows multi-threaded access to many of its structures, reallocating would break this.

Can the physics system even be shut down? I saw that the PhysicsSystem has a destructor in place, but the IslandBuilder's destructor didn't look like it was implemented.

Yes it can, the IslandBuilder only uses temporary allocations that are …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Pindrought
Comment options

@jrouwe
Comment options

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