[fix] when physics2d-builtin shape sets group should check collider then addShape (#13790)

* [fix] when physics2d-builtin shape sets group should check collider then addShape #13361

* tweaks
This commit is contained in:
Ling Zhan
2022-12-13 11:12:39 +08:00
committed by GitHub
parent eb359b4667
commit a2b2d83015
+3 -1
View File
@@ -77,7 +77,9 @@ export class BuiltinPhysicsWorld implements IPhysicsWorld {
updateShapeGroup (shape: BuiltinShape2D) {
this.removeShape(shape);
this.addShape(shape);
if (shape.collider.enabledInHierarchy) {
this.addShape(shape);
}
}
step (deltaTime: number, velocityIterations = 10, positionIterations = 10) {