Skip to content

Commit

Permalink
Fix characterController create error (#2508)
Browse files Browse the repository at this point in the history
* fix: characterController create error
  • Loading branch information
luzhuang authored Jan 15, 2025
1 parent 155d76d commit fddde88
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 33 deletions.
60 changes: 30 additions & 30 deletions packages/physics-physx/libs/physx.release.downgrade.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/physics-physx/libs/physx.release.js

Large diffs are not rendered by default.

Binary file modified packages/physics-physx/libs/physx.release.wasm
100644 → 100755
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/physics-physx/src/PhysXPhysics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ export class PhysXPhysics implements IPhysics {
}

if (runtimeMode == PhysXRuntimeMode.JavaScript) {
script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*CfV8RrDQk5oAAAAAAAAAAAAAARQnAQ/physx.release.downgrade.js`;
script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*PXxaQrGL0XsAAAAAAAAAAAAAARQnAQ/physx.release.downgrade.js`;
} else if (runtimeMode == PhysXRuntimeMode.WebAssembly) {
script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*ZDDgR4ERdfwAAAAAAAAAAAAAARQnAQ/physx.release.js`;
script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*0Qq8Rob3_5oAAAAAAAAAAAAAARQnAQ/physx.release.js`;
}
});

Expand Down
3 changes: 3 additions & 0 deletions tests/src/core/physics/CharacterController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ describe("CharacterController", function () {
capsuleColliderShape.contactOffset = 0.1;
capsuleColliderShape.radius = 0.2;
capsuleColliderShape.height = 1;

controller.enabled = true;

expect(capsuleColliderShape.contactOffset).eq(0.1);
expect(capsuleColliderShape.radius).eq(0.2);
expect(capsuleColliderShape.height).eq(1);
Expand Down

0 comments on commit fddde88

Please sign in to comment.