Skip to content

Conversation

@fangzhangmnm
Copy link

@fangzhangmnm fangzhangmnm commented May 15, 2019

Threr are two errors in the trimesh system:

The error of collision of spheres with nonzero shapeOffset with trimesh was found.
The error is because one forget to add spherePos-sphereBody.position to r.ni in the edge and triangle cases.

Another error is the original method delete the children without triangle belongs to it, but it seems one forgot that, although there may be no triangle belongs to X, there may be triangles belong to X's children!
So I write a recursive algorithm for it to check if its children has any triangles in their descendents, then decide whether to delete them.

The error of collision of spheres with nonzero shapeOffset with trimesh was fixed.
The error is because one forget to add spherePos-sphereBody.position to r.ni in the edge and triangle cases.
The original method delete the children without triangle belongs to it, but it seems one forgot that, although there may be no triangle belongs to X, there may be triangles belong to X's children!
So I write a recursive algorithm for it to check if its children has any triangles in their descendents, then decide whether to delete them.
@fangzhangmnm fangzhangmnm changed the title Fix sphereTrimesh collision error Fix several errors about trimesh May 15, 2019
@reindernijhoff
Copy link

Thank you @fangzhangmnm for these fixes!

stockhuman added a commit to pmndrs/cannon-es that referenced this pull request Mar 7, 2020
yaustar pushed a commit to yaustar/cannon.js that referenced this pull request May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants