Contents

maxxfrazer/arkit-focusnode

The root class here uses a class I found in Apple's documentation for ARKit apps that I wanted to have easy to use myself, and thought others would benefit from it too.

Minimum Requirements

  • Swift 5.0

- iOS 11.3

Installation

Swift Package Manager

Add the URL of this repository to your Xcode 11+ Project and select version 2.0+ https://github.com/maxxfrazer/ARKit-FocusNode.git

CocoaPods

Include this pod in your Podfile like so:

pod 'FocusNode'

Usage

See the Example for a full working example as can be seen in the image above

V2

Follow steps in V1, and then whatever you have as your sceneView class, for example ARSCNView, add the protocol of ARSmartHitTest to it like the following:

extension ARSCNView: ARSmartHitTest {}

V1

Import FocusNode to your .swift file and add it to your scene as so:

let focusNode = FocusSquare()
sceneView.scene.rootNode.addChildNode(self.focusNode)
focusNode.viewDelegate = sceneView

Check out the Example project or message me on GitHub or twitter if it's unclear.

I DID NOT WRITE A MAJORITY OF THIS CODE MYSELF, MOST OF IT WAS TAKEN DIRECTLY FROM APPLE'S EXAMPLES

Package Metadata

Repository: maxxfrazer/arkit-focusnode

Default branch: master

README: README.md