How to detect whether two entities collide in RealityView and execute some instructions after the collision. It is assumed that both entities have collision components, and one of them also has an anchor component (such as a binding hand).
visionOS
RSS for tagDiscuss developing for spatial computing and Apple Vision Pro.
Posts under visionOS tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
How to make a specified entity in RealityView be captured by users:
This entity has physical and collision components, and the user will not change when he does not grasp the action. However, when the user makes a grab hand gesture and is very close to the entity (there can be a small deviation), an Anchor component will be enabled to bind the entity to the hand, but when the user lets go, he will fall along the y-axis of the current position (affected by the physical component).
I hope you can help me. Thank you.
I saw onnoffitacation in the Behavior configuration of Reality Composer pro, which asked me to enter the Nofficatition name, that is to say, this requires swift in Xcode to send a message. There is a message name in the message, so I hope you can write a list for me how to use Swift in Xcode to send a message containing the message name.(There is an answer in https://developer.apple.com/forums/thread/756978, but it doesn't work.)
and in the time line in Reality Composer Pro, there is a Notification action, which is used to send messages to swift. How can I ask swift to detect whether the Notification action has sent a message?(There is an answer in https://developer.apple.com/videos/play/wwdc2024/10102/, but it doesn't work.)
I have asked this question before (https://developer.apple.com/forums/thread/756978). Those answers were available before, but now they are all invalid in the latest system. I hope you can help me. Thank you.
Hello: I have Xcode running and I have already downloaded the Vision Pro simulator, but it doesn't open. It even appears open within the Xcode application as an internal window and it works... but it doesn't allow me to open the simulator app. I need help, please. I'll leave a couple of pictures below that explain it better.
To set the stage:
I made a prototype of an app for a company, the app is to be used internally right now. Prototype runs perfectly on iOS, so now I got VP to port the app to its final destination. The first thing I found out is that the image tracking on VP is useless for moving images (and that's the core of my app). Also distance at which image is lost seems to be way shorter on VP. Now I'm trying to figure out if it's possible to fix/work around it in any way and I'm wondering if Enterprise API would change anything.
So:
Is it possible to request Enterprise API access as a single person with basic Apple Developer subscription? I looked around the forum and only got more confused.
Does QR code detection and tracking work any better than image detection, or anchor updates are the same?
Does the increased "object detection" frequency affect in any way image/QR tracking, or is it (as name implies) only for object tracking?
Would increasing the CPU/GPU headroom make any change to image/QR detection frequency?
Is there something to disable to make anchor updates more frequent? I don't need complex models, shadows, physics, etc.
Greetings
Michal
I am having trouble with initializing the SharePlay. It works but we have to leave the game (click the close button) and rejoin it, sometimes several times, for it to establish the connection.
I am also having trouble sharing images over SharePlay with GroupSessionJournal. I am not able to get it to transfer any amount of data or even get recognition on the other participants in the SharePlay that an image is being sent. We have look at all the information we can find online and are not able to establish a connection. I am not sure if I am missing a step, or if I am incorrectly sending the data through the GroupSessionJournal.
Here are the steps I took take to replicate the issue I have:
FaceTime another person with the app.
Open the app and click the SharePlay button to SharePlay it with the other person.
Establish the SharePlay and by making sure that the board states are syncronized across participants. If its not click the close button and click open app again to rejoin the SharePlay. (This is one of the bugs that I would like to fix. This is just a work around we developed to establish the SharePlay. We would like it so that when you click SharePLay and they join the session it works.)
Once the SharePlay has been established, change the image by clicking change 1 image.
Select a jpg image.
The image that represents 1 should be not set. If you dont see the image click on any of the X in the squares and it will change to the image.
The image should appear on the other participant in the SharePlay. (This does not happen and is what we have not been able to figure out how to get working.)
Here are the classes for the example project I created:
Content View
Game Model Class
Activity Manager
Main Starter Class
I am trying to position the share sheet popped up by the shareLink API on VisionOS, but the share sheet is always anchored by at the label position.
I checked the Photos app is achieving this already, the share sheet there appears at very center of the window while the share button locates at the corner inside the menu.
How is this possible to make it?
Hello
I was wondering if the keyboard awareness feature that came with visionOS 2 would also work for the Mac Book keyboard if someone is in an immersive .progressive custom environment such as the "Garden" environment from Construct an immersive environment for visionOS in e.g. an app I'm currently developing, to see one's keyboard. I haven't managed to achieve it so far.
Thank you very much in advance!
Hi, we have in our app an immersive space and we taught the palm menu button is not available in immersive spaces, but when I look in the hand and tap the menu button appear. Is it possible to keep it hidden? Because we a have an hand tracking feature in palm and when we try to press a button to overlap the palm it triggers the menu button and then when the user presses again by mistake, it sends the application to the background.
This is very important for us because we would like to release this hand-tracking feature as soon as possible.
Here is a link with to a video with the problem:
https://drive.google.com/file/d/1cfOcdzF19h_mbmpvkVNCJjXEBJecVeJL/view?usp=sharing
Today I updated my macbook pro to macOS sequoia. with this I also downloaded the latest Xcode and visionOS 2 packages.
I had a working project. Which did work with my vision pro which is updated to the latest visionOS 2. But now whenever I try to click on preview in xcode while editing a swift file I am receiving the following error:
(lot of lines here)
Library/Developer/Xcode/DerivedData/test2-fznbrpphddkqdaddrzamkayoajjm/Build/Intermediates.noindex/RealityKitContent.build/Debug-xrsimulator/RealityKitContent_RealityKitContent.build/DerivedSources/RealityAssetsGenerated/CustomComponentUSDInitializers.usda
error: Tool terminated by signal 'Segmentation fault: 11'
I tried exiting and restarting my mac but the problem is not going away. Can someone help me with this?
Thank you!
How can I create a 3D model of clothing that behaves like real fabric, with realistic physics? Is it possible to achieve this model by photogrammetry? I want to use this model in the Apple Vision Pro and interact with it using hand gestures.
https://developer.apple.com/documentation/realitykit/model3d/ontapgesture(count:coordinatespace:perform:)
link -> double tap gesture deprecated in visionOS2.0. use only watchOS. right..?
so how can i make a double tap gesture in visionOS??
My app has two Window Groups: Window1 and Window2
Moving Window2 to Window1 will overlay, and I cannot see or interact with Window1. My question is, is there any way that I can make Window1 always on top, and whenever Window2 moves in front of Window1, will it be overlayed instead of Window1?
Given my limited knowledge of physics, I would appreciate it if individuals with a solid understanding of the subject could provide insights into this matter. I have added a physical component to a entity in Reality Composer Pro, but I am seeking guidance on how to achieve the following:
Make an object float in the air (with a slight downward motion reminiscent of the moon’s surface)
Enable the object to move at a slow pace
Implement a strong rebound force
I would be grateful if you could provide appropriate values for these parameters. Thank you for your assistance.
I am working on a project that requires access to the main camera on the Vision Pro. My main account holder applied for the necessary enterprise entitlement and we were approved and received the Enterprise.license file by email. I have added the Enterprise.license file to my project, and manually added the com.apple.developer.arkit.main-camera-access.allow entitlement to the entitlement file and set it to true since it was not available in the list when I tried to use the + Capability button in the Signing & Capabilites tab.
I am getting an error: Provisioning profile "iOS Team Provisioning Profile: " doesn't include the com.apple.developer.arkit.main-camera-access.allow entitlement. I have checked the provisioning profile settings online, and there is no manual option for adding the main camera access entitlement, and it does not seem to be getting the approval from the license.
I'm using Unity to create a VisionOS project. Using Polyspatial. I want to be able to use WeatherKit. I can not seem to create a VisionOS plugin in Unity. I've found all sorts of resources for building one for iOS. I made small changes to convert to VisionOS, but no matter what I do, I get 'Undefined Symbol' errors when I try to build the XCode project.
Most recently I used this github for reference https://github.com/Robert-96/unity-swift/tree/main
Am i trying to do something that just isn't possible for VisionOS?
I am honored that I successfully participated in the "Envision the future: Build great apps for visionOS"(https://developer.apple.com/events/view/ZCH7ZUY24C/dashboard) conference. However, unfortunately, I am in China, and due to the visa problem (because it usually takes at least 2 months to apply for a visa, but it only takes about 10 days from the time I received the notice to the meeting), I can't go to the United States to participate in the site. So I hope Apple can place an iPad on site and create a FaceTime link, and then I can make a call to this iPad. I also told Apple about this suggestion, but now there are only a few days left to start. They didn't reply to me. Even Apple has sent me the ticket to the Developer Center and asked me to add it to the Apple Wallet App, which means that Apple has not There is a request to deal with me. So I hope you can give me some advice or help me for those who know about this aspect. For Apple's internal engineers, if possible, I hope you can contact the person who manages this meeting. I'm very grateful for this. Thank you.
Hello, I am getting following error on console and my app crashes. It goes to dark and then Apple logo appears and app crashes
apply fence tx failed (client=0x61dbbfd7) [0xfffffecc (ipc/mig) server died]
[C:3] Error received: Connection interrupted.
Failed to commit transaction (client=0x94097449) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0xe9684b50) [0x10000003 (ipc/send) invalid destination port]
[C:3-1] Error received: Connection interrupted.
Failed to commit transaction (client=0xbcac17e9) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0x52392119) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0xff841d17) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0xdef5c915) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0xefdc8bf3) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0xd50c1eff) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0x15690a46) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0xf296f56b) [0x10000003 (ipc/send) invalid destination port]
Failed to commit transaction (client=0x61dbbfd7) [0x10000003 (ipc/send) invalid destination port]
apply fence tx failed (client=0x61dbbfd7) [0x10000003 (ipc/send) invalid destination port]
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_read_request_report [C1] Receive failed with error "No message available on STREAM"
nw_protocol_socket_reset_linger [C1:2] setsockopt SO_LINGER failed [22: Invalid argument]
apply fence tx failed (client=0x61dbbfd7) [0x10000003 (ipc/send) invalid destination port]
Failed to set override status for bind point component member.
Failed to set override status for bind point component member.
Failed to set override status for bind point component member.
Message from debugger: Terminated due to signal 9
Could you please tell me what's the reason and how can I resolve this. When I loads 2,3 times then app works fine from that point onwards. But this happens time to time when debug.
Hey!
Any plans on supporting Photogrammetry Sessions on VisionOS?
https://developer.apple.com/documentation/realitykit/photogrammetrysession
Thanks!
I'm getting the following error in my swift build targeting VisionOS 2.0 :
" 'defaultDisplay' is unavailable in visionOS "
TLDR : how do I specify an initial window position in visionOS? The docs seem to be off? - see below.
The docs say it is available, but it is not, or at least my XCODE (Version 16.0 ) is throwing errors on it :
https://developer.apple.com/documentation/swiftui/scene/defaultwindowplacement(_:)
I know apple is opinionated about window placement in visionOS, and maybe it will never be available, but the docs say it is in visionOS 2.0+ and it sure would be nice to be able to specify a default position toward the bottom of one's FOV, etc .
Side-note -- the example code in that doc also has the issue that "Window" is not available in visionOS ( WindowGroup is ).
example code -- barely modified from example code in doc :
var body: some Scene {
WindowGroup("MyLilWindow", id: "MyLilWindow") {
TestView()
}
.windowResizability(.contentSize)
.defaultWindowPlacement { content, context in
let displayBounds = context.defaultDisplay.visibleRect
let size = content.sizeThatFits(.unspecified)
let position = CGPoint(
x: displayBounds.midX - (size.width / 2),
y: displayBounds.maxY - size.height - 140)
return WindowPlacement(position)
}
}