Updated 12 August 2024
Now a days AR is mostly used in various places like eCommerce or for study material etc. Today I am going to tell you about how to save the AR session and load on real environment.
It is more use full for custom map which can be used in house map because google or Apple Map will not work inside the house or mall so here I am taking the example of Shop where the
user will get the path to their product so the user will not get to ask from the shop assistant or shop keeper.
For Draw the Path Follow this Steps:
1: Create A UIViewController Class name “ARPathRecorderController”.
a: Take all the necessary controller that are shown in the screenshot.
Note:
Load : this will load and check it is fine or not (it is just for testing).
Cancel: Cancel the Record.
Save : it will save the AR session to local Document directory.
2: Now Create the Outlet of ARscniew and other UIComponent Outlet.
3: Write the ViewDidload method and Viewwill Appear method :
Note:
First we set the delegate of ARScnview , after that set the light for clear model & add the tap gesture so that when the user will tap on screen it will add image or GIF image on Horizontal Surface for path .
4: On Tap on the screen there will be one delegate method will be called , here we will have to draw the image or GIF on surface.
Note:
Here we are taking the gif image that will draw on surface on every tap .
5: Now its time to save to this model .
You have to save every model by unique ID so that you can identify easily.
a: Now write the outlet function of Save button:
Now your model is saved with corresponding Map Id.
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.