Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix physics system stablity #1047

Merged
merged 6 commits into from
Sep 19, 2022
Merged

Fix physics system stablity #1047

merged 6 commits into from
Sep 19, 2022

Conversation

yangfengzzz
Copy link
Member

@yangfengzzz yangfengzzz commented Sep 15, 2022

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

The raycast max distance is out of float range, it will complain in PhysX debugger mode.
The collider shape should not be shared, which is set in construction method.
The character controller is not copy shape's query id, which will faill when using raycast.

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

@GuoLei1990
Copy link
Member

You fix many bug in this PR, write as a list to introduce is better

@GuoLei1990
Copy link
Member

Another thing is:

/**
   * {@inheritDoc IPhysicsManager.addCharacterController }
   */
  addCharacterController(characterController: PhysXCharacterController): void {
    const lastPXManager = characterController._pxManager;
    const shape = characterController._shape;
    if (shape) {
      if (lastPXManager !== this) {
        lastPXManager && characterController._destroyPXController();
        characterController._createPXController(this, shape);
      }
      this._pxScene.addController(characterController._pxController);
    }
    characterController._pxManager = this;
  }

@GuoLei1990 GuoLei1990 changed the title fix: fix physics system stablity Fix physics system stablity Sep 19, 2022
@GuoLei1990 GuoLei1990 merged commit bff5f74 into galacean:main Sep 19, 2022
@GuoLei1990 GuoLei1990 added bug Something isn't working and removed enhancement labels Sep 19, 2022
GuoLei1990 added a commit to GuoLei1990/galacean-engine that referenced this pull request Sep 22, 2022
* main:
  v0.8.0-beta.26
  feat: shader add properties get ability (galacean#1060)
  Fix scene root entity destroy bug (galacean#1062)
  Fix call `engine.destroy()` crash  in `Script` (galacean#1059)
  Fix physics system stablity (galacean#1047)
  v0.8.0-beta.25
  Fix script onDisable() error call bug (galacean#1055)
  fix: sprite transform error when rotates (galacean#1053)
  feat: remove throw (galacean#1052)
  Update README.md
  Update README.md
  v0.8.0-beta.24
  Fix `TextRenderer` render error (galacean#1040)
  v0.8.0-beta.23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority High priority issue physics Engine's physical system
Projects
Status: Done
2 participants