Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vision Pro window that follows me

With Vision Pro, if you look up, there is a button that opens a view for selecting apps, control panel, and others. This button will follow you as you move around a room. I want to program a window in my visionOS app that does this, that is, stays in place in my FOV as I move around without me having to hold the window bar.

Can this be done?

like image 678
Agilepap Avatar asked Nov 01 '25 19:11

Agilepap


2 Answers

This is supposedly limited to ImmersiveSpace with ImmersionStyle set to .full, to avoid interfering with other apps, which makes sense.

Use AnchorEntity and AnchoringComponent.Target.head.

Marking this as a "Community wiki" answer, so someone can improve it.

  1. https://developer.apple.com/documentation/visionos/creating-fully-immersive-experiences
  2. https://developer.apple.com/documentation/realitykit/anchorentity
  3. https://developer.apple.com/documentation/realitykit/anchoringcomponent/target-swift.enum/head
like image 155
mrienstra Avatar answered Nov 04 '25 20:11

mrienstra


This does not seem possible with a normal Window.

Although you can change the window’s content, you can’t directly manipulate window position or size after the window appears. This ensures that people have full control over their workspace.

https://developer.apple.com/documentation/visionos/positioning-and-sizing-windows

like image 22
Joe Muller Avatar answered Nov 04 '25 20:11

Joe Muller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!