13
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【ARKit入門】 まずやること

Last updated at Posted at 2017-11-23

#ARKit入門

##ARKitを使う際にまずやること

###1.カメラの使用許可

カメラ使用.png
カメラの使用するためにinfo.plistを設定しましょう!

###2.ストーリーボードにARSCNView追加
スクリーンショット 2017-10-30 1.56.34(2).png

このビューがある部分が検出対象!

###3.平面検出

ViewController.swift
//検出用configを作成
let configuration = ARWorldTrackingConfiguration()

//showWorldOrigin:初期位置に座標表示 showFeaturePoints:検出できたとこにpointが表示
self.mainSceneView.debugOptions = [ARSCNDebugOptions.showWorldOrigin, 
ARSCNDebugOptions.showFeaturePoints]

//検出対象に平面を設定
self.configuration.planeDetection = .horizontal

//検出開始!
self.mainSceneView.session.run(configuration)

以上でARKitを使用する準備が整いました!次回から実際にオブジェクト配置とか、とか
→ 12/20 新しい記事投稿しました!
【ARKit入門】平面にアイテムを配置する

13
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?