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

Float32 issues resulting in wrong controllers moves #1399

Open
AnthonyGlt opened this issue Jan 16, 2025 · 0 comments
Open

Float32 issues resulting in wrong controllers moves #1399

AnthonyGlt opened this issue Jan 16, 2025 · 0 comments

Comments

@AnthonyGlt
Copy link

AnthonyGlt commented Jan 16, 2025

Hello, thank you for this repo.

I'm working on the implementation of the VR controllers support in iTowns.

Since we are working in gps/global coordinates, I'm facing some difficulties to set the referenceSpace correctly.

By using this king of coordinates, we are overflowing the float32 arrays used in XRRigidTransform (and more generally in the definition of ReferenceSpace). The resulting matrix has only rounded numbers to fit as float32.
(A bit related to #1236)

const transform = new XRRigidTransform(new Vector3(4485948.637198923, 476198.0416370128, 4497216.056600053), quat);
const baseReferenceSpace = xr.getReferenceSpace();
const teleportSpaceOffset = baseReferenceSpace.getOffsetReferenceSpace(transform);
xr.setReferenceSpace(teleportSpaceOffset);

The consequences are that my controllers are moving in some kind of stairways pattern, not smoothly (see the video)

Do you have a way to correct this ?

Thank you
iTowns related issue

Screencast.from.16-01-2025.11.40.50.webm
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