reordering optimizeBroadPhase
This commit is contained in:
parent
a6ae7f02f0
commit
d42db622e7
|
|
@ -244,17 +244,18 @@ pub const PhysicsRuntime = struct {
|
|||
physChar.deinit();
|
||||
}
|
||||
|
||||
self.system.optimizeBroadPhase();
|
||||
// self.system.update(0.01, .{}) catch {};
|
||||
{
|
||||
const interface = self.system.getBodyInterfaceMut();
|
||||
|
||||
var iterator = self.idToEntity.keyIterator();
|
||||
while (iterator.next()) |bodyId| {
|
||||
self.system.optimizeBroadPhase();
|
||||
interface.removeAndDestroyBody(bodyId.*);
|
||||
}
|
||||
}
|
||||
|
||||
self.system.optimizeBroadPhase();
|
||||
{
|
||||
var iterator = self.shapes.iterator();
|
||||
while (iterator.next()) |n| {
|
||||
|
|
|
|||
Loading…
Reference in New Issue