Skip to content

Instantly share code, notes, and snippets.

@PaulWall43
Created April 22, 2018 22:34
Show Gist options
  • Select an option

  • Save PaulWall43/2be1173996ef3d4a5a819f86cbbb94ea to your computer and use it in GitHub Desktop.

Select an option

Save PaulWall43/2be1173996ef3d4a5a819f86cbbb94ea to your computer and use it in GitHub Desktop.
//In our viewWillAppear configure the session to run with these settings
override func viewWillAppear(_ animated: Bool) {
//Standard tracking configuration
let configuration = ARWorldTrackingConfiguration()
//We want to detect all horizontal planes (i.e. the floor)
configuration.planeDetection = .horizontal
//Set the delegate to be self so we can be updated when relevant things happen
session.delegate = self
//Run the session using this configuration (no options for this)
session.run(configuration, options: [])
//Note: It is possible to run the session so that you can see the feature points being created by ARKit.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment