Play Timeline on Entering AR/VR

Just about to test it now. Thanks for the extra suggestions :slightly_smiling_face: Back with feedback asap…

by user 908977119781060648

Hmmmmm… no luck :thinking:

I’ve tried:-

import {
  Behaviour,
  PlayableDirector,
  serializable,
  WebXR,
} from "@needle-tools/engine";
import { WebXREvent } from "@needle-tools/engine/engine-components/WebXR";

export class Play extends Behaviour {
  @serializable(PlayableDirector)
  timeline?: PlayableDirector;

  awake() {
    window.addEventListener("pointerdown", () => {
      if (this.timeline) {
        this.timeline.playOnAwake = true;
        this.timeline.play();
      }
    });
  }

  start() {
    WebXR.addEventListener(WebXREvent.XRStarted, () => this.timeline?.play());
  }
}

… and it’s still not happening.

Even if I start the timeline via interaction so it’s actually running when I hit the AR button, the timeline has stopped when the AR version is displayed. As said, it’s really not a deal-breaker… but it would be cool to get to the bottom of it if possible :sunglasses:

by user 908977119781060648

Mmmh strange. I cant think of another reason for it to not play right now. Will try to test it as soon as i get a chance

Many thanks… and I’ll try and test on another device asap in case that’s the problem :slightly_smiling_face:

by user 908977119781060648