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

Importing convex mesh types to a world #104

Open
coolcomfort opened this issue Feb 4, 2023 · 0 comments
Open

Importing convex mesh types to a world #104

coolcomfort opened this issue Feb 4, 2023 · 0 comments

Comments

@coolcomfort
Copy link

coolcomfort commented Feb 4, 2023

Hello,

I was referencing the test_basic.html and trying to change the ground types to a convex mesh. I loaded in a mesh with GLTFLoader from THREE. I also went ahead and added it to the scene and can visibly see it. I then repurposed some of the pre-existing ground code in attempt to create my own based on the custom mesh. I set the type to convex, and then set the shape to the geometry buffer of my custom GLTF loaded object. Unfortunately I keep getting the same error:

Cannot read properties of undefined (reading 'parent')

  world.add({
    type: "convex",
    shape: collisionWorld.geometry,
    size: [15, 15, 15],
    pos: [0, 0, 0],
    density: 1,
    friction: 1,
    restitution: 1,
    world: world,
  });

Let me know if you are able to assist.

Thanks,
coolcomfort

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

1 participant