Closed TheSlugInTub closed 2 months ago
I'm sorry, but there's not enough information in this description for me to say anything sensible. The AllocateBody function for example is more than 50 lines of code so it could be anything. In general, creating bodies from other threads should work just fine.
i wasn't registering the body allocator correctly, well I was but all the initialization of jolt and the allocator was inside a function, and that didn't work for some reason, i switched it to a macro that puts all that init stuff in your main function
Hello, I'm trying to loop over entities with a rigidbody3d component (struct) and the struct has a Body* pointer.
This code is run for each entity with the rigidbody3d component (struct). But it just crashes immediately, it says 'Read access violation', the last two call stacks were BodyInterface::CreateBody and BodyManager::AllocateBody. This worked just fine when I had all the jolt physics stuff in the main function. And if you're wondering, this is the rigidbody struct: