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

There seems to be sometimes a displacement between the visual position and the collision position of the cylinder #7

Open
MrCsabaToth opened this issue Jul 19, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@MrCsabaToth
Copy link
Member

This is for the collision box experiment. Originally I placed the cylinder outside of the collision box, but then there was about half meter displacement between the visual AR Node cylinder and the Physics simulated collision shape of the cylinder. I placed the cylinder to the dead center (0, 0, 0), that kinda helped but there's still seems to be some displacement sometimes, sometimes at an equilibrium some planks dip into the cylinder. Maybe it's just the simulated cylinder is not that wide as the visual?

@MrCsabaToth MrCsabaToth added the bug Something isn't working label Jul 19, 2020
@MrCsabaToth MrCsabaToth self-assigned this Jul 19, 2020
@MrCsabaToth
Copy link
Member Author

Actually it seems that the moving around causes collisions, but then the physics engine somehow resets the collision shape back to dead center...

@MrCsabaToth
Copy link
Member Author

Addition: when I'm doing the first drag action, the phantom cylinder doesn't appear in the center until I end the first drag-around operation. As soon as the first drag ends and I release it, that's when the phantom appears in the center and bursts the planks. I should debug what's happening at that point. Maybe I need to set the AR Node to the center too, but by UX the cylinder should stay where it is, which can be on the sideline. And after consecutive drag-around operations it seems that both the red visual cylinder is colliding and both the phantom is still there.

@MrCsabaToth
Copy link
Member Author

It seems like that something whacky is going on in the TransformableNode's TranslationController's public void onEndTransformation(DragGesture gesture) {: https://github.com/google-ar/sceneform-android-sdk/blob/master/sceneformux/ux/src/main/java/com/google/ar/sceneform/ux/TranslationController.java#L162

Maybe it's something with the // Temporarily set the node to the final world rotation so that we can accurately // determine the initialForwardInLocal in the new coordinate space. or whatever but when the gesture ends it causes a bump in the location... that's where something is wrong!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant