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

Fix scaling problems in sixDofDragBehavior #14669

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

carolhmj
Copy link
Contributor

@carolhmj carolhmj commented Jan 4, 2024

Related forum issue: https://forum.babylonjs.com/t/unselected-meshes-move-alongside-the-selected-mesh/46627/11?u=carolhmj

The resetting/setting of the parent in _sceneRenderObserver seems to be causing some instability in the scale decomposition for nodes with parents and certain rotation/scales, so instead of doing this process (which is also more costly in performance terms), the idea is to do all the operations in the node's local space.

@carolhmj carolhmj added the bug label Jan 4, 2024
@bjsplat
Copy link
Collaborator

bjsplat commented Jan 4, 2024

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 4, 2024

Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

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

LGTM, I trust you on the maths :-) Let s merge after @Popov72 review

@Popov72
Copy link
Contributor

Popov72 commented Jan 4, 2024

Same for the maths :)

Maybe we can ping @CraigFeldspar as he is the original author of the behavior.

Copy link
Member

@CraigFeldspar CraigFeldspar left a comment

Choose a reason for hiding this comment

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

Looks good to me, I just have a doubt on the fact that the delta vector is transformed as a position and not a normal

@sebavan sebavan merged commit 3dda3fd into BabylonJS:master Jan 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants