Recentering Camera in Studio API

Hi, I’m new to 8th Wall here.

I am currently experimenting with the Gaussian Splats in the Studio (specifically the Portal). But I want the door/portal to be placable, similar to how it’s done in this project - World Tracking Portal (Editor Project)

I believe the code responsible for the repositioning is sceneEl.emit('recenter'), which can only be used in the Editor version. I have gone through the documentation as thoroughly as possible, but I have not found the equivalent of this event in Studio Version.

Is this behavior replicable in the Studio version through a script? (currently using Typescript). I can see that the same behavior is achieved by clicking on the “recenter” button on the Simulator. So I wonder if it’s doable via script.

Any help is appreciated, thanks

Hi, welcome to the forum!

You can call recenter from XR8, the engine, using the Window API like this:

const {XR8} = window as any

XR8.XrController.recenter()
1 Like

Appreciate the timely reply, George. It works as intended, so thanks a lot.

However, is there a reason why it doesn’t appear in the auto-complete (intellisense)? Is that something still in development?

If so, is it safe to assume that we can access all the Engine API’s features through window?

Thanks again.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.