Skip to content

Teleport Seems not working on Apple Vision Pro #436

@bytesbay

Description

@bytesbay

Im running an example in examples/react-three-xr locally and found that Teleport is not rendering and not working on AVP.
I went through the code and checked if there is a problem with Pointer. I removed pointer.getButtonsDown().size === 0 condition here:

// TeleportPointerRayModel in packages/xr/src/teleport.ts

update(pointer: Pointer): void {
    const enabled = pointer.getEnabled()
    const intersection = pointer.getIntersection()

    if(Math.random() < 0.005) {
      console.log('getButtonsDown', pointer.getButtonsDown(), pointer.id);
    }
    
    // removed pointer.getButtonsDown().size === 0 from here
    if (!enabled || pointer.getButtonsDown().size === 0 || intersection == null) {
      this.visible = false
      return
    }

    // rest of the code
}

And the curve line started to render okay, but still teleport did not work so i started to dig deeper and noticed that Pointer.down() and Pointer.up() are firing in different Pointer instances (with different id) than we expect in TeleportPointerRayModel.update.

My XRStore setup

const store = createXRStore({
  emulate: true,
  handTracking: true,
  hand: { teleportPointer: true, grabPointer: false, rayPointer: false, touchPointer: false },
  controller: { teleportPointer: true, grabPointer: false, rayPointer: false },
})

// without grabPointer: false, rayPointer: false, touchPointer: false also not working

I spent alot of time on debugging this and i need some help if possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions