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

Overriding updateMatrixWorld() leads to issues #70

Open
rhuitl opened this issue Jun 16, 2020 · 0 comments
Open

Overriding updateMatrixWorld() leads to issues #70

rhuitl opened this issue Jun 16, 2020 · 0 comments

Comments

@rhuitl
Copy link
Contributor

rhuitl commented Jun 16, 2020

The method Object3d.updateMatrixWorld()(https://github.com/mrdoob/three.js/blob/400acd3c78c8e631087322eb1e0e9fc00a16b375/src/core/Object3D.js#L560) is overridden in

updateMatrixWorld(force: boolean): void {
with a method that does not recurse into the children.

Can anyone clarify why this is done? Doesn't that break things when the world matrices of the child nodes should be updated, e.g. after changing the model matrix of the whole point cloud?

For me it does break things, it looks like most parts of the point cloud move to the new position but some points are left behind. I'm calling updateMatrixWorld(true) on the point cloud object. Inspecting the child nodes, I see that their matrixWorld has not been updated.

When I use the related method updateWorldMatrix(false, true) instead (https://github.com/mrdoob/three.js/blob/400acd3c78c8e631087322eb1e0e9fc00a16b375/src/core/Object3D.js#L594), which is not overridden, my code works as expected.

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