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

Object3D: Ensure .localToWorld() uses the updated world matrix #25097

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

WestLangley
Copy link
Collaborator

... as in Object3D.getWorldPosition(), etc.

@WestLangley WestLangley added this to the r148 milestone Dec 9, 2022
@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 9, 2022

There is already a discussion about this topic, see #20220.

In this issue, there was no consensus about making the change proposed in this PR.

Although I favor the call of updateWorldMatrix(), we should not forget the update matrix computations in three.js are expensive since no caching system is in place. Besides, @donmccurdy raises concerns about always calling updateWorldMatrix() and proposed different solutions #20220 (comment).

Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's OK. I still think there's a challenge we're going to need to think about eventually on performance, but having different methods (.localToWorld, .getWorldPosition) perform differently will only confuse people further.

If there are specific performance ceilings we can measure and discuss, we'll work on that too.

@Mugen87 Mugen87 merged commit 46618d2 into mrdoob:dev Dec 12, 2022
@WestLangley WestLangley deleted the dev-local_to_world branch December 12, 2022 15:40
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 this pull request may close these issues.

3 participants