-
Notifications
You must be signed in to change notification settings - Fork 156
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
Scale of InstancedMesh is overwritten #367
Comments
I don't really understand what's going on here. You change the scale of the three object, but don't change the scale of the physics object. How is this supposed to work? It's still going to be the original scale in the physics engine and it won't match the scale of the three object. |
The base use case I have is a gltf that I need to scale down to have it fit in my scene and match the physics body I have defined. This scale gets wiped out by use-cannon currently leaving me with no tools to fit my gltf InstancedMeshes in my scene other than to resize them in Blender and reexport them. Another use case I have is sometimes scaling an InstancedMesh is part of a visual effect I have that I don't want to affect the physics body. For instance, I scale a mesh down to have it "disappear" and then once it is gone I clean up the physics body. This is also impossible currently. Although you are right, I should enhance the example to actually adjust the physics bodies to match the intended mesh scales. I got lazy. :) |
If a scale is applied to an instanced mesh before use-cannon touches it, use-cannon will overwrite it back to [1, 1, 1].
Here is a simple sandbox example: https://codesandbox.io/s/use-cannon-debug-instance-example-forked-yi6m2y?file=/src/App.js
The text was updated successfully, but these errors were encountered: