Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
XR Interaction Toolkit 1.0.0-pre で VR開発してみよう / ...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Denik
February 19, 2021
Programming
5.3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
XR Interaction Toolkit 1.0.0-pre で VR開発してみよう / xrdnk-caunityLT1-presentation
Denik
February 19, 2021
More Decks by Denik
See All by Denik
Oculus Interaction SDK 概説 / xrdnk-caunity-LT4
xrdnk
0
12k
Unity Localization で多言語対応実装しよう / xrdnk-yokohamaunity-lt10-20220513
xrdnk
0
10k
XR Interaction Toolkit 2.0.0 正式リリース記念パピコ / xrdnk-xrmtg-lt-20220316
xrdnk
0
10k
Unidux を用いたマルチシーン構成の画面遷移 / xrdnk-unity-otonanolt-2021
xrdnk
0
6k
Unity Cloud Save でプレイヤーデータのクラウド保存しよう / xrdnk-yokohamaunitylt9
xrdnk
0
1.8k
Feel でゲームのエフェクトを豪華にしよう / xrdnk-yokohamaunityLT8
xrdnk
1
2k
Unidux Scene Transition Hands-on / xrdnk-unidux-scene-transition-hands-on
xrdnk
1
500
新MLAPIでマルチゲームを作ってみた / xrdnk-gotandaunityLT19-presentation
xrdnk
1
4.5k
三種の神器とMVRPパターン / xrdnk-three-sacred-treasures-and-mvrp-pattern
xrdnk
1
7.5k
Other Decks in Programming
See All in Programming
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
350
VibeCodingからAgenticWorkflowへ
starfish719
0
940
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
260
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
740
T3DD26: From RAGs to Riches
martinhelmich
0
110
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
160
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.8k
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
310
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.3k
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
270
Deep dive into the select statement (GopherCon UK)
jespino
0
150
Dockerfile CMD for Node.js
grazie1999
0
140
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
45k
How STYLIGHT went responsive
nonsquared
100
6.2k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Making Projects Easy
brettharned
120
6.7k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
400
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
We Are The Robots
honzajavorek
0
310
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Technical Leadership for Architectural Decision Making
baasie
3
540
Transcript
XR Interaction Toolkit 1.0.0-pre で VR 開発してみよう Cyber Agent unity
#1 Lighting Talk
自己紹介 【名前 / ハンネ / Twitter】 Denik / デニキ /
@xrdnk 【職歴】 TIS 株式会社 19年度入社 インキュベーションセンター 新規事業開発 XR チーム - XR エンジニア (20.5 ~ 現在) - システムエンジニア (19.04 ~ 20.05) 本発表は個人の見解です. 所属組織の意見云々ではありません.
アジェンダ ➢ XR Interaction Toolkit の説明 ➢ XR Interaction Toolkit
の機能紹介 ➢ XR Interaction Toolkit 応用サンプル紹介 ➢ おわりに
XR Interaction Toolkit の説明
XR Interaction Toolkit とは (1/2) Unity が提供する VR/AR インタラクションシステムのツールキットです. 似たツールとして
Oculus 側が Oculus Integration を提供しています.
XR Interaction Toolkit とは (2/2) 2019年12月頃に preview package として公開され,しばらく update
がありませんでしたが, 2020年10月に version 0.10 が公開され,約10か月振りに新機能が追加されています. また,1.0.0-pre 版が出ており,リリース目前になっています. 本発表では VR 側の機能について説明します. VR 版では以下の機能が提供されています. ➢ Object Interaction ➢ UI Interaction ➢ Locomotion
検証環境 本発表における検証環境は以下の通りです. ➢ Unity 2019.4.17f1 ➢ Universal RP 7.3.1 ➢
XR Interaction Toolkit 1.0.0-pre.2 ➢ Oculus Quest 2 XR Interaction Toolkit は 0.10.0 以後からいくつか機能が追加されています. どのバージョンから対応しているかは右下のラベルのように表示しておきます. 0.9 ~
インストール UPM でインストールします. XR Interaction Toolkit は preview packages であるため,
Advanced > Show preview packages にチェックをする必要があります. 0.9 ~
機能紹介
Interaction
Interactor と Interactable Interactor インタラクションの主体 (コントローラ etc.) Interactable インタラクションの客体 (物体/UIパネル
etc.) Interaction Manager インタラクションシステム の管理クラス OnHover OnSelect OnHover OnSelect 0.9 ~
XR Ray Interactor コントローラから Ray を出せるようになります. Ray を通して 遠隔インタラクションができます. XR
Ray Interactor を用いて VR 物体を遠隔的に掴む【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2020/08/03/213914 0.9 ~
XR Direct Interactor コントローラで直接インタラクションできるようになります. XR Direct Interactor を用いて VR 物体を直接的に掴む【XR
Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2020/08/08/183219 0.9 ~
XR Socket Interactor 物体を以前の位置に格納することが出来ます.応用範囲が広いです. XR Socket Interactor を用いて VR 物体を以前の位置に戻す【XR
Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/01/18/195418 0.9 ~
XR Grab Interactable 物体にアタッチすることで掴める物体となります. XR Ray Interactor を用いて VR 物体を遠隔的に掴む【XR
Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2020/08/03/213914 XR Direct Interactor を用いて VR 物体を直接的に掴む【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2020/08/08/183219 0.9 ~
XR Simple Interactable Grab 機能のない Interactable です. 掴みたくないけど物体を Interactable にしたい場合に利用します.
0.9 ~
Interactor / Interactable Events HoverEntered HoverExited SelectEntered SelectExited 0.9 ~
Audio / Haptic Events HoverEntered HoverExited SelectEntered SelectExited 0.9 ~
Events をスクリプトで発火 勿論 Events はスクリプトを通して発火できます. スクリプトを通して Interactor Events / Interactable
Events にイベントを登録する【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/06/174354 0.9 ~
Locomotion
Locomotion System XR Interaction Toolkit では以下の Locomotion System が提供されています. 0.9
以前 ➢ Snap Turn (瞬発的な視点回転移動) ➢ Teleportation (テレポート/ワープ/ブリンク) 0.10 以後追加 ➢ Continuous Turn (連続的な視点回転移動) ➢ Continuous Move (移動処理) 0.9 ~
Snap Turn Provider 瞬発的な視点回転処理を行うことが出来ます. Snap Turn Provider (Device-based) を利用して VR
視点を回転させる【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/01/19/074338 0.9 ~
Teleportation Provider テレポート処理を提供します. テレポート先の判定は「平面」のArea,「点」のAnchor の2種類があります. Teleportation Area Teleportation Anchor XR
Interaction Toolkit を用いたテレポート/ワープ処理の実装方法【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/02/073415 0.9 ~
Teleportation Configuration / Match Orientation テレポート処理後の向きの設定です.どの方向に合わせるか. 0.9 以前と 0.10 以後で
Enum の内容が変わっていますので注意. World y Axis y x z World Space Up ワールド空間のy軸に合わせる World y Axis y x z Target Up ワープ先のy軸に合わせる World y Axis y x z Target Up and Forward ワープ先のyz軸に合わせる World y Axis y x z None ワープ処理前の向きと同じ 0.10 ~
Continuous Turn Provider VR空間内で連続的な視点回転処理を実行します. Continuous Turn Provider (Device-based) を用いて VR
空間内での連続的な視点回転処理を行う【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/01/30/204617 0.10 ~
Continuous Move Provider VR空間内で移動処理を実行します. Enable Strafe 横移動(ストライフ移動)を有効にするか設定. チェックを外すと前後移動しかできなくなります. Continuous Move
Provider (Device-based) を用いて VR 空間内で移動処理を行う【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/01/28/215255 0.10 ~
Character Controller Driver Character Controller の Height を現実の頭部位置に合わせて自在に調整します. Character Controller
Driver を利用して Character Controller の Height を現実の頭部位置に合わせて自在に調整する【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/01/080000 適用前 適用後 0.10 ~
Input System Package 対応 (Action-based) Input System Package 対応版が追加されました. 対応しているのはコントローラ操作機能.
➢ XR Controller ➢ Continuous Move Provider ➢ Continuous Turn Provider ➢ Snap Turn Provider XR Interaction Toolkit を Input System (Action-based) で利用する【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/10/000000 Input Manager 版 は Device-based になっている Input System 版 は Action-based になっている 0.10 ~
XR Device Simulator Editor 上で VR コントローラ操作を行うことができます. VR 機器を所持していなくても疑似的に操作することが可能に. Input
System Package に対応している場合のみに利用できます. (Input Manager 版だと利用できません) 操作方法の例 ➢ Shift キー: 左コントローラ操作 ➢ Space キー: 右コントローラ操作 ➢ Shift + WASD: 左コントローラのスティック操作 ➢ Space キー + WASD: 右コントローラのスティック操作 XR Device Simulator を利用してマウスキーボードでVRアプリ内の操作を行う【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/12/200000 0.10 ~
応用サンプル紹介
リストポケット Socket Interactor を継承して独自クラスを作れば,こんな応用もできます. 手首に物を収納できるリストポケットです. How to Create Wrist Pockets
for Unity XR https://youtu.be/JmaAHyNvA98 0.9 ~
両手持ち物体 XR Grab Interactable を拡張すれば,両手持ち物体の実装も出来ます. 右手で銃を持ち,左手でエイム調整を行うというギミックを搭載することもできます. Two Handed Weapons using
Unity's XR Toolkit https://youtu.be/IX2EUAcocoM 0.9 ~
おわりに
Unity WebXR Unity WebXR 近々 XR Interaction Toolkit 対応 https://twitter.com/marcel_wiessler/status/1356376306968109068
https://twitter.com/marcel_wiessler/status/1359456457226354691
XR Interaction Toolkit Roadmap 将来実装予定 ➢ Remote Input Debugger (リモートインプットデバッガ)
➢ Animated Controller Models (手のモデル) ➢ Articulated Hand Tracking (多関節ハンドトラッキング) ➢ Two Handed Interactions (両手インタラクション) XR Interaction Toolkit Public RoadMap https://portal.productboard.com/unity/4-unity-ar-vr-platform-support/tabs/8-xr-interaction-toolkit フォーラムによれば,XR Interaction Toolkit は Unity 2021.2 で 1.0.0 リリースを目指している模様. XR Interaction Toolkit 1.0.0-pre.2 pre-release is available https://forum.unity.com/threads/xr-interaction-toolkit-1-0-0-pre-2-pre-release-is-available.1046092/
XR Interaction Toolkit 参考資料 ➢ XR Interaction Toolkit – Examples
/ GitHub ← まずはこれ https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples ➢ XR Interaction Toolkit Official Document (English) https://docs.unity3d.com/Packages/
[email protected]
/manual/index.html ➢ Andrew 氏の YouTube / GitHub https://www.youtube.com/channel/UCG8bDPqp3jykCGbx-CiL7VQ https://github.com/C-Through ➢ Dilmer 氏の YouTube / GitHub https://www.youtube.com/channel/UCHM37DnT_QGJT5Zyl4EmqcA https://github.com/dilmerv ➢ Unity Learn (現在ほぼ日本語化対応) Escape Room も XRIT 対応
まとめ・所感 ➢ XR Interaction Toolkit を利用すれば VR インタラクションシステムの一通りの実装が出来る ➢ XR
Interaction Toolkit は UPM を利用しているため, Assets にアセットを 置く必要がなく, Oculus Integration に比べてリポジトリの容量が増えない ➢ 最低限のコンポーネントしかないので,機能拡張したい場合は Base を継承するか Oculus Integration 等,他のSDK と組み合わせて使うのが現状か