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

wireframe 辅助线与实际碰撞体对齐问题 #231

Open
yiiiiiiqianyao opened this issue Oct 26, 2023 · 0 comments
Open

wireframe 辅助线与实际碰撞体对齐问题 #231

yiiiiiiqianyao opened this issue Oct 26, 2023 · 0 comments
Assignees

Comments

@yiiiiiiqianyao
Copy link

在重新设置 entity 的位置之后,wireframe 显示的位置和 collider 实际位置存在偏移

model.addComponent(MeshRenderer);
  const wireframe = model.addComponent(WireframeManager);
  const colliderEntity = model.createChild('colliderEntity');
  // Add collider.
  const collider = colliderEntity.addComponent(StaticCollider);
  const capsuleColliderShape = new CapsuleColliderShape();
  capsuleColliderShape.position.set(0, 0.5, 0);
  capsuleColliderShape.height = h > 0.6 ? h * 0.7 : 0.1; // 接近一个球
  capsuleColliderShape.radius = h > 0.6 ? 0.8 : 0.5;
  collider.addShape(capsuleColliderShape);
  wireframe.addEntityWireframe(colliderEntity);

  setTimeout(() => {
    model.transform.position.y = 2;
  }, 1000)
  • 版本信息
    "@galacean/engine": "1.1.0-beta.14",
    "@galacean/engine-mars": "0.2.5-alpha.0",
    "@galacean/engine-physics-physx": "1.1.0-beta.14",
    "@galacean/engine-toolkit-auxiliary-lines": "1.1.0-beta.1",
    "@galacean/engine-toolkit-controls": "1.1.0-beta.1",
    "@galacean/engine-toolkit-stats": "1.1.0-beta.1",

image

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

No branches or pull requests

2 participants