dispose physics on remove
This commit is contained in:
parent
6510a493a0
commit
20acbbecaa
@ -88,6 +88,10 @@ export class PhysicsService {
|
||||
root.traverse((object) => {
|
||||
if (trackedObjects.some((item) => item.uuid === object.uuid)) {
|
||||
physicsLeaveUUIDs.push(object.uuid);
|
||||
|
||||
if ((object as PhysicsObject).dispose) {
|
||||
(object as PhysicsObject).dispose();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user