Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved ARKit support for iOS via Unity-ARKit-Plugin

Discussion in 'AR' started by jimmya, Jun 5, 2017.

Thread Status:
Not open for further replies.
  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Hey Christopher, just checked this out and it looks great! Thank you so much for looking into that!
    I have one question, at the moment you have a scene where you tap to place the box in a scene, do you think it would be possible to keep the box in the same position (in the Unity scene) but offset the camera transform to get the same effect? That way the actual scene would not have to be touched at all.
    What do you think?
    P.
     
    christophergoy likes this.
  2. flyingdeutschman

    flyingdeutschman

    Joined:
    Jul 26, 2013
    Posts:
    8
    Hey all, Apologies if this has been answered, but I couldn't find the answer here. Noob alert.
    I'm trying to give the user the ability to set the placed object (the HitCube) to SetActive(false). I can only effect the visibility of the object if I target the HitCubeParent, though. I'm trying to figure out how to target the placed object since it's not the GameObject in the hierarchy.

    Also, I've created a button that disables the ARKit functionality but I can't get it above the ARKit depth, so when pressing the button, a new object is placed.

    Thanks in advance!
     
  3. RubyKrongDev

    RubyKrongDev

    Joined:
    May 25, 2016
    Posts:
    16
    I Add code:
    Code (CSharp):
    1.     Destroy(FindObjectOfType<UnityARGeneratePlane> ().gameObject);
    2.         SceneManager.LoadScene ("Map");
    But it not work.
    Help please!:(
     
  4. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793
    I'll have to look at this again, but last time I looked at it, there was an assumption by ARKit that it detects feature points and planes relative to the camera, so if you make the transform offset from the camera, the feature points and planes do not appear where they are supposed to. There is probably some manipulation possible to make this work, but we felt it was outside the scope of the plugin. Certainly, if someone finds a good solution, we are happy to include it.

    [edit: we originally wanted to do exactly what you proposed, that is why we had a parent transform to begin with]
     
  5. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793
    You could try to make UnityARGeneratePlane::OnDestroy public and call it whenever you want to reset planes generated.
     
  6. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey, Yeah. I think you can place your content at a place in the scene that you want it to be offset from the camera. I just used the UnityARKitScene to show the capabilities. I think you can do whichever paradigm works for you and your content.
     
  7. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    I can make a branch that does this and see how much of the code it touches. If it seems to work ok, we can merge it into the main line. Would you be willing to test it out when it's ready @MSFX?
     
  8. jessevan

    jessevan

    Joined:
    Jan 3, 2017
    Posts:
    35
    Thanks for reaching out to them. It seems odd that you could restart a session with the "heading" option enabled and not have it respect heading. They are making it very hard to provide anything resembling persistence.
     
  9. theiajsanchez

    theiajsanchez

    Joined:
    Feb 2, 2017
    Posts:
    18
    Is there a way to combine them before sending it in a single byte array?
     
  10. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey, take a look at this post. It describes a way to check if you hit a UI component.
    http://answers.unity3d.com/question...ot-working-with-touch-inp.html#answer-1115473

    I used that for the scaled content example I wrote. It worked great.
     
  11. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    You can combine them after, this is what the ARKit Remote is doing. You can check out the code either in the asset store package, or the bitbucket repo
     
    theiajsanchez likes this.
  12. zajako

    zajako

    Joined:
    Mar 4, 2016
    Posts:
    1
    In UnityARHitTestExample.cs the touch checks need the edit below to prevent clicks on UI from going through the UI. This causes your object to move when you're clicking on UI buttons and stuff.

    After This:
    void Update () {
    if (Input.touchCount > 0 && m_HitTransform != null)
    {
    var touch = Input.GetTouch(0);
    if (touch.phase == TouchPhase.Began || touch.phase == TouchPhase.Moved)
    {


    Add This:
    if(EventSystem.current.IsPointerOverGameObject(Input.GetTouch(0).fingerId))
    {
    return;
    }

    Also needs These includes at the top:

    using UnityEngine.EventSystems;
    using UnityEngine.UI;

    Once this is in your UI buttons will no longer be click throughable for moving the ARKit objects
     
    ler4y likes this.
  13. LabanTwissel

    LabanTwissel

    Joined:
    Aug 17, 2017
    Posts:
    4
    Hi Chris, did you have time to have a look on it?
     
  14. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Hey Christopher, i think this is what I was also trying to achieve (just explained it bad sorry). I’d be happy to give it a try also.
     
    christophergoy likes this.
  15. Infrid

    Infrid

    Joined:
    Jan 14, 2012
    Posts:
    67
    Trying to try out ARKit and the remote - I had probems with xcode beta 4, updated to newest (beta 7). I can't build the Unity Arkit project, I get a ton of linker errors.

    Undefined symbols for architecture armv7:

    "_OBJC_CLASS_$_ARWorldTrackingConfiguration", referenced from:

    objc-class-ref in ARSessionNative.o

    "_OBJC_CLASS_$_AROrientationTrackingConfiguration", referenced from:

    objc-class-ref in ARSessionNative.o

    "_OBJC_CLASS_$_ARAnchor", referenced from:

    objc-class-ref in ARSessionNative.o

    "_OBJC_CLASS_$_ARPlaneAnchor", referenced from:

    objc-class-ref in ARSessionNative.o

    "_OBJC_CLASS_$_ARSession", referenced from:

    objc-class-ref in ARSessionNative.o

    ld: symbol(s) not found for architecture armv7

    clang: error: linker command failed with exit code 1 (use -v to see invocation)​

    Anyone got any ideas? I can't get beyond this, at this point :(
     
  16. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793
    You're using something wrong - what is beta 7? The latest I see on Apple dev site is Xcode 9 Beta 5. That is the one you should be using. Also, update your device with iOS11 Beta 6. Make sure you have a clean download of the latest Unity ARKit Plugin (bitbucket or asset store, make sure you delete any old files from it you may have sticking around). Then let us know if you still have issues.
     
  17. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey,
    Sorry not yet. Hopefully this weekend. Keep at it! And I’ll get to it as soon as I can.
     
  18. Infrid

    Infrid

    Joined:
    Jan 14, 2012
    Posts:
    67
    sorry confused, was Unity beta 7 - xcode is beta 5. I was building for generic device (didn't have my ipad plugged in); not sure if that's why it's happening..

    I just started a new unity project in 2017.2.b7, with latest ARkit from assetstore. Exactly the same issue.
     
  19. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Building for a generic device might cause this to happen.
     
  20. yuliwei

    yuliwei

    Joined:
    Aug 19, 2017
    Posts:
    22
    I got this error: (I'm using xcode 9 beta5 and unity 5.6.2f1)

    typedef NSUInteger MTLPixelFormat;

    enum

    {

    MTLPixelFormatBGRA8Unorm,

    MTLPixelFormatBGRA8Unorm_sRGB,

    };
     

    Attached Files:

  21. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    You need unity 5.6.2p2 or later
     
  22. Grimps

    Grimps

    Joined:
    Nov 4, 2016
    Posts:
    15
    Thanks for the reply. I moved my router closer to my computer and that increased the frame rate to about 12hz, but there was still a 6-7 second latency. I connected my USB cable directly into my Mac instead of through a Thunderbolt router I was using. The latter was the biggest bottleneck. Now it runs nicely. However, what are the limitations? Is interactivity supported? Because when I run the UnityARBallz (or my own scene for that matter), nothing happens when I click on the screen or when I tap on the device.

    **EDIT: I think there is something wrong with my device–when using the remote, it ONLY shows up on my computer and not on the device**
     
    Last edited: Aug 19, 2017
  23. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    67
    Hi
    Trying to get Mapbox working with Unity & ARKit using this tutorial – i.e. summon a map on a table. Using Xcode beta 5 + latest version of ARkit remote plugin. Booting up the pre-built scene 'Twin Peaks' gives this error. Anyone got a solution? Would be cool to summon a 3D map of a landscape or country on a table.
     
  24. phits

    phits

    Joined:
    Aug 31, 2010
    Posts:
    41
    Anyone else having trouble downloading iOS 11 Beta 6? It's been trying to download for over 12 hours.
     
  25. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    I managed to get it yesterday, but it has broken the screen recorder for any 3d game.
     
  26. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    What issue are running into with screen recording?
     
  27. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    There is no support for touches or hit tests at the moment.
     
  28. amadgavkar

    amadgavkar

    Joined:
    Aug 18, 2017
    Posts:
    3
    When I build to XCode I get a gray screen that says "waiting for editor connection..." but nothing happens. I've tried this on my iPad as well as an iPhone 7.

    I've looked through all of the other questions and haven't found anything that solves my issue.

    XCode Version: 9 beta 5
    Unity Version: 5.6.3f1
    iPad Version: iOS 11 beta 6

    Here are the logs and screenshot is attached:
    2017-08-20 12:34:32.273790-0400 arkitscene[315:9695] [DYMTLInitPlatform] platform initialization successful

    2017-08-20 12:34:32.348398-0400 arkitscene[315:9484] -> registered mono modules 0x1012bb000

    2017-08-20 12:34:32.473683-0400 arkitscene[315:9484] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.

    -> applicationDidFinishLaunching()

    Player data archive not found at `/var/containers/Bundle/Application/07AAEBD2-8B2D-4949-8062-B977FECF5025/arkitscene.app/Data/data.unity3d`, using local filesystem2017-08-20 12:34:32.530062-0400 arkitscene[315:9484] Metal GPU Frame Capture Enabled

    2017-08-20 12:34:32.530480-0400 arkitscene[315:9484] Metal API Validation Disabled

    2017-08-20 12:34:32.737578-0400 arkitscene[315:9484] [MC] Lazy loading NSBundle MobileCoreServices.framework

    2017-08-20 12:34:32.738552-0400 arkitscene[315:9484] [MC] Loaded MobileCoreServices.framework

    2017-08-20 12:34:32.742390-0400 arkitscene[315:9484] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles

    2017-08-20 12:34:32.763920-0400 arkitscene[315:9484] refreshPreferences: HangTracerEnabled: 0

    2017-08-20 12:34:32.764034-0400 arkitscene[315:9484] refreshPreferences: HangTracerDuration: 500

    2017-08-20 12:34:32.764056-0400 arkitscene[315:9484] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0

    -> applicationDidBecomeActive()

    GfxDevice: creating device client; threaded=1

    Initializing Metal device caps: Apple A9 GPU

    Initialize engine version: 5.6.3f1 (d3101c3b8468)

    =================================================================

    Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]

    PID: 315, TID: 9711, Thread name: (none), Queue name: NSOperationQueue 0x1c422fba0 (QOS: UNSPECIFIED), QoS: 0

    Backtrace:

    4 arkitscene 0x0000000100615d8c UnityCurrentOrientation + 60

    5 arkitscene 0x000000010060390c __UnityCoreMotionStart_block_invoke + 108

    6 Foundation 0x0000000184c13230 <redacted> + 16

    7 Foundation 0x0000000184b53904 <redacted> + 72

    8 Foundation 0x0000000184b43540 <redacted> + 848

    9 libdispatch.dylib 0x0000000183bd0fac <redacted> + 16

    10 libdispatch.dylib 0x0000000183bd8644 <redacted> + 288

    11 libdispatch.dylib 0x0000000183bd0fac <redacted> + 16

    12 libdispatch.dylib 0x0000000183bd8644 <redacted> + 288

    13 libdispatch.dylib 0x0000000183bd84f0 <redacted> + 104

    14 Foundation 0x0000000184c14f08 <redacted> + 376

    15 libdispatch.dylib 0x0000000183bd0fac <redacted> + 16

    16 libdispatch.dylib 0x0000000183bd9350 <redacted> + 428

    17 libdispatch.dylib 0x0000000183bd7d04 <redacted> + 784

    18 libdispatch.dylib 0x0000000183bde12c <redacted> + 596

    19 libdispatch.dylib 0x0000000183bdde74 <redacted> + 120

    20 libsystem_pthread.dylib 0x0000000183e77130 _pthread_wqthread + 1268

    21 libsystem_pthread.dylib 0x0000000183e76c30 start_wqthread + 4

    2017-08-20 12:34:37.180212-0400 arkitscene[315:9711] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]

    PID: 315, TID: 9711, Thread name: (none), Queue name: NSOperationQueue 0x1c422fba0 (QOS: UNSPECIFIED), QoS: 0

    Backtrace:

    4 arkitscene 0x0000000100615d8c UnityCurrentOrientation + 60

    5 arkitscene 0x000000010060390c __UnityCoreMotionStart_block_invoke + 108

    6 Foundation 0x0000000184c13230 <redacted> + 16

    7 Foundation 0x0000000184b53904 <redacted> + 72

    8 Foundation 0x0000000184b43540 <redacted> + 848

    9 libdispatch.dylib 0x0000000183bd0fac <redacted> + 16

    10 libdispatch.dylib 0x0000000183bd8644 <redacted> + 288

    11 libdispatch.dylib 0x0000000183bd0fac <redacted> + 16

    12 libdispatch.dylib 0x0000000183bd8644 <redacted> + 288

    13 libdispatch.dylib 0x0000000183bd84f0 <redacted> + 104

    14 Foundation 0x0000000184c14f08 <redacted> + 376

    15 libdispatch.dylib 0x0000000183bd0fac <redacted> + 16

    16 libdispatch.dylib 0x0000000183bd9350 <redacted> + 428

    17 libdispatch.dylib 0x0000000183bd7d04 <redacted> + 784

    18 libdispatch.dylib 0x0000000183bde12c <redacted> + 596

    19 libdispatch.dylib 0x0000000183bdde74 <redacted> + 120

    20 libsystem_pthread.dylib 0x0000000183e77130 _pthread_wqthread + 1268

    21 libsystem_pthread.dylib 0x0000000183e76c30 start_wqthread + 4

    UnloadTime: 35.112957 ms

    STARTING ConnectToEditor

    UnityEngine.XR.iOS.ConnectToEditor:Start()



    (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)



    Setting up 1 worker threads for Enlighten.

    Thread -> id: 170c8f000 -> priority: 1
     

    Attached Files:

  29. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    It records 1 still frame. No 3d recording, also tested with a app store 3d game. Same problem.
     
  30. Infrid

    Infrid

    Joined:
    Jan 14, 2012
    Posts:
    67
    I'm afraid I have
    Afraid that's not solved it.

    Latest ARKit from App store
    Unity beta 2017.2 beta 7
    Xcode 9 beta 5
    ipad pro, latest iOS beta installed (as of this morning)

    Get these errors

    ```
    Undefined symbols for architecture arm64:
    "_OBJC_CLASS_$_ARWorldTrackingConfiguration", referenced from:
    objc-class-ref in ARSessionNative.o
    "_OBJC_CLASS_$_AROrientationTrackingConfiguration", referenced from:
    objc-class-ref in ARSessionNative.o
    "_OBJC_CLASS_$_ARAnchor", referenced from:
    objc-class-ref in ARSessionNative.o
    "_OBJC_CLASS_$_ARPlaneAnchor", referenced from:
    objc-class-ref in ARSessionNative.o
    "_OBJC_CLASS_$_ARSession", referenced from:
    objc-class-ref in ARSessionNative.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    ```
     
    cschar and MonHao like this.
  31. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Can you try switching scenes to the UnityARKitScene and build that instead? I think thI default is the Remote scene
     
    amadgavkar likes this.
  32. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Can you check your build settings in unity and make sure your architecture is either “universal” or “arm64”?
     
  33. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Is this with the unity support for replaykit? Or something else?
     
    Last edited: Aug 20, 2017
  34. SkaZonic

    SkaZonic

    Joined:
    Jun 20, 2017
    Posts:
    23
    Hi all, I am currently experimenting with the google vr and arkit plugin on GitHub (https://github.com/andrewnakas/ARKit-Cardboard-VR).

    But I am faced with an issue, I want to have multiple tags (quad prefabs) that the user can place in my scene, I understand that the unityarhittestexample is for only one object so I stumbled upon the ball maker script and decided to use that instead as it is for multiple objects however I also wanted my tags to always face the user and when I tried this out the tag appeared for half a second and then disappeared not even facing the user. What is my mistake? Is it not recommended I use the ball maker script? Is this to do with Arkits multiple cameras in the scene? Is my LookAt script code wrong? Thanks!
    P.s my LookAt script code is below, I attach this to the prefab that the ball maker generates (the ball maker script is attached to a empty game object in the scene).

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class LookAt : MonoBehaviour {
    6.  
    7.     // Use this for initialization
    8.     void Start () {
    9.        
    10.     }
    11.    
    12.     // Update is called once per frame
    13.     void Update () {
    14.  
    15.         transform.LookAt (Camera.main.transform.position, Vector3.up);
    16.  
    17.     }
    18. }
    19.  
     
  35. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi, you need to create a vector from your quad to the camera. Check out this question and answer here http://answers.unity3d.com/questions/552289/how-can-i-get-a-quad-to-face-the-camera.html
     
  36. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    67
    Got ARkit remote working with Unity and ARKitScene but when i tap on the iphone the cube doesn't spawn. Any ideas how to get gestures / interactions with iphone working in unity environment? (would speed up workflows dramatically)
     
    sama-van likes this.
  37. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Yes the same here.
    I only use the remote for the video + tracking with left hand like an ufo in office, then I have to look at my screen to click into the Game view from the editor...
    Some folks came and asking wtf I am doing all the day with the iphone up the display looking around like a spy :D :D
     
  38. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    @christophergoy
    Hi!

    I would like to come back on the scale issue we got a while ago, also tests from the scaled-content-test branch.

    If I understand well what does the trick, is to scale the camera from the root origin which is the scene (0,0,0) when the session starts.

    The fact is if you scale up the camera root from origin, it will only work if the anchor detection pops to the scene origin, which is almost impossible.

    Then when the simulation starts, the anchors will actually pop around this point.

    If you scale up the camera root from the origin, every assets who pop on an anchor, will appear a bit off from the anchor and then doesn't match at all.

    What I was looking for it to scale every assets from their origin.
    Thing I already handle for every single AI, level, etc... every is managed with a scale and match pefertly if I use my system and not the "scale-content-test" you provided.

    The only issue I have remains in the Navigation which can only be simulated at scale one, and absolutely no settings to force the simulation size for the navmesh.

    Then I think we should work a bit more on it since the navmesh system is important for most of the full 3D game including AI and movement.

    EDIT : Made a quick preview of what I think does your "patch" when you look from the extra camera with scale.
    - cyan planes > Original anchor//assets
    - red planes > What "feeling" it gives from the camera with scale.
    If I am wrong please explain to me then maybe I can understand where is the error from my scene and how I could fix it... :)
    Thank you!

    arkit Scale.png
     
    Last edited: Aug 21, 2017
  39. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Can anyone tell me how the iPhone 6S performs with ARKit in comparison to the 7? Is it pretty similar? I want to dable with ARKit, but I'm not sure whether to buy the cheaper 6S, or wait for the new iPhone 8. Developing using the baseline device is pretty typical, but I'm wondering if the 6S performs significantly worse than newer devices. Thanks!
     
  40. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    I’m not sure I completely understand but I think what you are seeing is a translation error due to the scaled camera. This is handled in the ScaledContentPlacer. The position of the content that is rendered by the scaled camera needs to be updated every time the scale changes. This should give the illusion that the content is in the right place. Have you tried to account for the scaling by fixing the position? Let me know

    edit: The relevant code:

    Code (CSharp):
    1. void UpdateScaledContent(Vector3 newScale, Vector3 prevScale)
    2. {
    3.         Vector3 pos = m_HitTransform.position;
    4.         // undo the previous scale
    5.         pos.Scale(new Vector3(1.0f / prevScale.x, 1.0f / prevScale.y, 1.0f / prevScale.z));
    6.         // apply the new scale
    7.         pos.Scale(newScale);
    8.         m_HitTransform.position = pos;
    9. }
     
    Last edited: Aug 21, 2017
  41. elhispano

    elhispano

    Joined:
    Jan 23, 2012
    Posts:
    52
    Hi guys! Thanks to the scaled content example in the repo we have managed to achieve a solution to "translate and scale the world" instead of our scenario.

    Our scenarios are static and we have some mathematical dependencies with the position (0,0,0) as the center of our scenario, so it was easier for us an approach to a solution where we move the camera parent instead of the entire scenario.

    To avoid any kind of problems with planes/anchors, we have a first state in our AR experience where the user select the plane an then we stop generating/updating planes. After the plane has been selected, we set the scale and place the content.

    Here are the lines to move the camera parent when user clicks over a plane:

    Code (CSharp):
    1.  
    2. foreach (var hitResult in hitResults)
    3. {
    4.   Vector3 pos = UnityARMatrixOps.GetPosition(hitResult.worldTransform);
    5.   pos.Scale(Vector3.one*scaleFactor);
    6.   arContentCameraParent.transform.localPosition = -pos;
    7.  
    8.   return true;
    9. }
    In the attached photos you can see an scenario of 30m2 placed in an office table, we have to increase the far plane of the cameras in order to avoid clipping when big scale numbers are applied.
     

    Attached Files:

    KwahuNashoba and christophergoy like this.
  42. RubyKrongDev

    RubyKrongDev

    Joined:
    May 25, 2016
    Posts:
    16
    All the same does not work =(
    Code (CSharp):
    1. FindObjectOfType<UnityARGeneratePlane> ().GetComponent<UnityARGeneratePlane> ().OnDestroy ();
     
  43. John1515

    John1515

    Joined:
    Nov 29, 2012
    Posts:
    248
    ARKit tracking is as good on the 6s as on the 7, but the 7 is of course more powerful giving you more "juice" for more fancy things.
    I had an app running smooth on the 7 with 4x anti aliasing, while the same app only was smooth on the 6S without AA.

    I would be interested to know how much % of CPU power ARKit uses on a given iPhone model. Anyone?
     
  44. flyingdeutschman

    flyingdeutschman

    Joined:
    Jul 26, 2013
    Posts:
    8
  45. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    oh oh no.... Updating the ContentScaleManager.... X___X.... Shame on me! :D
    Screen Shot 2017-08-21 at 22.20.30.png
     
  46. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    ARKit promises to take one half of one core on any device.
     
  47. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    @christophergoy

    Sincerely sorry but still do not get it.

    1 - Stoped updating the ContentScaleManager.
    2 - Made an empty object with the Scaled Content Placer script.
    3 - under this object I dropped the _Asset object which content every assets from my scene.
    4 - I fill the Hit Transform input with the _Asset transform.
    5 - in runtime I update the ScaleContentPlacer transform with the wished scale (since no public function is available)
    6 - result is this transform is of course scaled, scale the entire hierarchy and then the Navigation Mesh is dead as expected.

    Could you please help me a bit more to get the correct setup without affecting the _Asset scale?...

    Below the pic show the current hierarchy :

    Screen Shot 2017-08-21 at 23.08.03.png
     
  48. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Great, thanks for the info!
     
  49. lnguy1948

    lnguy1948

    Joined:
    Apr 15, 2017
    Posts:
    6
    How do I reset the initial position of the camera and spawn the object in relation to the camera?
     
  50. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Once you start a session you cannot just reset the position. You can however reset the tracking data using the RunWithConigAndOptions function on ARSessionNativeInteface. This has been answered previously. You should be able to search the forum for the previous answer.
    If you want to spawn an object relative from the camera, you can use the Instantiate function and pass in a position relative to the cameras positon in world space. If you look at the Particle Painter scene, it has an example of spawning objects where the camera is.
     
    lnguy1948 likes this.
Thread Status:
Not open for further replies.