arfoundation-samples | Example content for Unity projects based on AR Foundation | Augmented Reality library
kandi X-RAY | arfoundation-samples Summary
kandi X-RAY | arfoundation-samples Summary
Example content for Unity projects based on AR Foundation
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of arfoundation-samples
arfoundation-samples Key Features
arfoundation-samples Examples and Code Snippets
Community Discussions
Trending Discussions on arfoundation-samples
QUESTION
I just started learning AR development with unity using this YouTube tutorial (https://www.youtube.com/watch?v=lelX8GGh_S8). At some point in the tutorial, the creator added a script called "Place on Plane" to the AR Session Origin. He didn't write the script in the tutorial and it seems more like a Unity script but for some reason, I wasn't able to find it in my Unity and now I'm stuck. Please, any assistance would be greatly appreciated.
Script: https://github.com/Unity-Technologies/arfoundation-samples/blob/main/Assets/Scripts/PlaceOnPlane.cs
...ANSWER
Answered 2022-Mar-18 at 09:27If you look into the PackageManager for ARFoundation
you find
Samples available at https://github.com/Unity-Technologies/arfoundation-samples
which basically means: These are not included! If you want to use anything from there then download and import these samples into your project.
QUESTION
I am running this ARKit example project https://developer.apple.com/documentation/arkit/creating_a_collaborative_session. Everything works perfectly, except that the ARParticipantAnchor
's transform is always NaN (all 16 numbers in the transform matrix are NaN). Other ARAnchor
s all have a valid transform value but ARParticipantAnchor
doesn't.
From my understanding of ARKit, after a peer iPhone joined the collaboration session, an ARParticipantAnchor
is added through the delegate function session:didAddAnchors:
to represent the location and orientation of that peer. After that, ARKit keeps updating that ARParticipantAnchor
's transform through the delegate function session:didUpdateAnchors:
to minor the real-time location and orientation of that peer's iPhone.
I have run this sample project several months ago and it went perfectly. So I am pretty confident that I am not missing any detail. But from yesterday, I could not make it work. An ARParticipantAnchor
was successfully added after a peer had joined the collaboration session, and the delegate function session:didUpdateAnchors:
was called every frame, but the ARParticipantAnchor
's transform in session:didUpdateAnchors:
was always NaN!
I also tried the Unity ARFoundation samples in this repo https://github.com/Unity-Technologies/arfoundation-samples/tree/main/Assets/Scenes/ARKit/ARCollaborationData, and it doesn't work either! I have used this repo several months ago and I am pretty sure it worked.
So, if both native ARKit and Unity have this problem, I suspect that probably there is a bug in ARParticipantAnchor
after a recent ARKit update? After all, if ARParticipantAnchor
's transform is always NaN, what is the point to update it every frame and share that data through the network? Could anyone tell me how to make it work? Thanks!
ANSWER
Answered 2021-Nov-15 at 08:52Ok, I have found the solution. It was because of the iOS version.
Previously, I was running iOS 15.1, after I upgraded all my devices to iOS Beta 15.2, everything worked perfectly.
QUESTION
I am tracking images with my AR-App and whenever an image got detected there should be a plane overlaying the tracked image.
The plane should have the same dimensions and rotation as the image.
I've already tried using this code snippet but retrieving the image's children's transform yields an error because the image doesn't have any children. Following this video wasn't successful either.
Anyone got an idea on how to get the ARTrackedImage's plane information?
...ANSWER
Answered 2020-Oct-30 at 10:36I solved my problem by instantiating a plane-prefab with the tracked image's transform as parent and modified its localScale to fit the image's size.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install arfoundation-samples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page