How to get Headset position?

How do you get the position of the headset input?! I can get the left and right hand controllers with some code like
const position = new Vector3();
context.renderer.xr.getController(0).getWorldPosition(position)
ā€¦ but not sure how to get the headset

Original Post on Discord

by user 931365436187111505

That should just be the main camera (this.context.mainCamera) or the webxr array camera (you can get it also from xr)

great i knew it was something obvious

by user 931365436187111505