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

Gizmo misc + disable sync physics #14907

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CedricGuillemet
Copy link
Contributor

@CedricGuillemet CedricGuillemet changed the title Gizmo misc Gizmo misc + disable sync physics Mar 25, 2024
@bjsplat
Copy link
Collaborator

bjsplat commented Mar 25, 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.

@@ -199,7 +199,7 @@ export class SixDofDragBehavior extends BaseSixDofDragBehavior {

if (pointerCount === 1) {
this._targetPosition.copyFrom(this._ownerNode.absolutePosition);
this._targetOrientation.copyFrom(this._ownerNode.absoluteRotationQuaternion);
this._targetOrientation.copyFrom(this._ownerNode.rotationQuaternion);
Copy link
Member

Choose a reason for hiding this comment

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

Why is position and scaling stay absolute, and only rotation uses local rotation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's the reverse. the PR did change position to absoluteposition to fix a bug and did the replacement for rotation and scale as well to be consistent. But actually, it introduced a regression with rotation. Do you confirm @carolhmj ?

Copy link
Member

Choose a reason for hiding this comment

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

Multipointer was also changed to absolute, is it still an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's wait for @carolhmj 's input on this fix and if it's ok then I'll do and test the multipoint.

Copy link
Contributor

Choose a reason for hiding this comment

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

I changed to absolutePosition/Rotation/Scale because I removed this line https://github.com/BabylonJS/Babylon.js/pull/14708/files#diff-867020a1c839af098f39ec5a7d63e25c7fa37dfd2e507e2143f86bafe643e85aL202 which was using setPosition(null) to make the node's position be the absolute position. If you copy only the local rotation, wouldn't that ignore the parent's rotation?

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 25, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 25, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14907/merge/testResults/webgpuplaywright/index.html

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 25, 2024

@RaananW
Copy link
Member

RaananW commented Mar 26, 2024

Weird enough, one of my open issues with WebXR dragging is the multipointer dragging which doesn't work as expected. I am debugging this now, but I don't want to cause any merge conflicts, so I might make the changes here or ask you to do them if possible.

@CedricGuillemet
Copy link
Contributor Author

Weird enough, one of my open issues with WebXR dragging is the multipointer dragging which doesn't work as expected. I am debugging this now, but I don't want to cause any merge conflicts, so I might make the changes here or ask you to do them if possible.

sure, np. let me know how I can help. if the mesh flips upside down with starting to drag, do the same for multipoint.

@sevaseva
Copy link

just in case: flipping upside down is one of the artifacts this PR fixes.

the other one I've seen is flying away (current tip of the branch 8ca757b does fix that too, but I just wanted to make sure you are aware of that): https://playground.babylonjs.com/#AZML8U#234

The model (2teaboxes.glb) that reproduces the flying away artifact has such a transform and geometry that the mesh is not near the origin.

@RaananW
Copy link
Member

RaananW commented Mar 26, 2024

sure, np. let me know how I can help. if the mesh flips upside down with starting to drag, do the same for multipoint.

No, it is actually moving to a different position and sometimes scales incorrectly. still trying to find the best solution

@CedricGuillemet CedricGuillemet marked this pull request as draft April 9, 2024 07:53
Copy link

github-actions bot commented May 8, 2024

This pull request has been marked as stale because it has been inactive for more than 14 days. Please update to "unstale".

@github-actions github-actions bot added the stale label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants