SHOTech Blog

プログラミングに関する記録です

【夏休みの宿題】MR Basics 100: Getting started with Unity

この夏はHoloLensのAcademyをきちんとやろうと思います。(今まで自分の興味あるところばっかりやってたので)

個人的夏休みの宿題というやつですね

 

このページで公開されているものですね。

docs.microsoft.com

知らない間にAzureとの連携も入っているので楽しみです。

古いやつはアップデートされていないので、バージョンの違いでうまくいかないところもあるかもしれないですが、とりあえずやってみる

 というわけで、まずはこれ

docs.microsoft.com

 

First, it will be easier to lay out your app if you imagine the starting position of the user as (X: 0, Y: 0, Z: 0). Since the Main Camera is tracking movement of the user's head, the starting position of the user can be set by setting the starting position of the Main Camera.

  1. Select Main Camera in the Hierarchy panel
  2. In the Inspector panel, find the Transform component and change the Position from (X: 0, Y: 1, Z: -10) to (X: 0, Y: 0, Z: 0)

 

 テキストは英語ですが、こんな感じで手順は書いてあるのでその通りにすすめるだけですね

youtu.be

こんな感じで動画もあるので、実装に迷うことはなさそうな感じがします。

f:id:syota-y1989:20180812135536p:plain

カメラの設定が終わったところ

MRTKあるので今更感はとりあえず置いておいて、めんどくさがらずに進めようと思います。

For HoloLens applications, the real world should appear behind everything the camera renders, not a Skybox texture.

  1. With the Main Camera still selected in the Hierarchy panel, find the Camera component in the Inspector panel and change the Clear Flags dropdown from Skybox to Solid Color.
  2. Select the Background color picker and change the RGBA values to (0, 0, 0, 0)

For mixed reality applications targeted to immersive headsets, we can use the default Skybox texture that Unity provides.

  1. With the Main Camera still selected in the Hierarchy panel, find the Camera component in the Inspector panel and keep the Clear Flags dropdown to Skybox.

ちなみに、このAcademyはHoloLensとWinMR両方に対応しているようで、こんな感じでそれぞれ書いてあるのもいいですね。

 

youtu.be

というわけで、特に迷うこともなくできました。固定してないのでちょっと斜めになってるけど気にしない!

次に進みます。

 

【補足】

HoloLensのスリープ時間変えとかないと、ちょっと置いてる間にスリープになるので変更しておくことをお勧めします。

バイスポータルから設定できました。

バイスポータルへの接続方法

azure-recipe.kc-cloud.jp

 

スリープ時間の変更方法

bluebirdofoz.hatenablog.com