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

console.log on ConvexPolyhedron.ts #158

Open
frankieali opened this issue Aug 31, 2022 · 1 comment · May be fixed by #161
Open

console.log on ConvexPolyhedron.ts #158

frankieali opened this issue Aug 31, 2022 · 1 comment · May be fixed by #161

Comments

@frankieali
Copy link

I'm seeing a lot of console.logs being generate from line 539 of https://github.com/pmndrs/cannon-es/blob/master/src/shapes/ConvexPolyhedron.ts#L539
console.log(`clamped: depth=${depth} to minDist=${minDist}`)

Is this suppose to indicate something to me?

@frankieali frankieali linked a pull request Sep 14, 2022 that will close this issue
@SuperLiii
Copy link

SuperLiii commented Jul 19, 2024

@frankieali

我使用 new THREE.SphereGeometry(200); 创建了一个球
当使用threeToCannon转换它到body时,忘记修改ShapeType.BOX => ShapeType.SPHERE得到了这个错误.所以推测它跟Mesh检测有关

function test_createHitShape(scene: THREE.Scene, world: CANNON.World) {
  const geometry = new THREE.SphereGeometry(200);
  const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
  const mesh = new THREE.Mesh(geometry, material);
  mesh.position.set(500, 1000, 500);
  scene.add(mesh);

  const result = threeToCannon(mesh, { type: ShapeType.BOX }); //<= watch this should be ShapeType.SPHERE
//...
}

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 a pull request may close this issue.

2 participants