Hi there again
I have some doubts about body management in space. I mean I have a simulation working in a separate thread. In the main thread I can add bodies in space or remove them via space's SpaceObjectBuffer. But what if I want to do some atomic operation? I want to add/remove several bodies. How can I garantie that the next simulation update takes into account the whole of that changes or nothing of them? Is it my job or bepu can do it for me automatically?
[V1] Atomic operations?
Re: [V1] Atomic operations?
There's no good built in solution for more complex logic like that, so I would recommend just creating your own buffered change queue that you can flush on the physics thread. The SpaceObjectBuffer is nothing special anyway- v2 doesn't even have an analogous feature since it is so low value.