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
ARコンテンツ作成勉強会:VuforiaでつくるスマホAR+VRアプリ
Search
shinjism
October 13, 2018
Technology
0
750
ARコンテンツ作成勉強会:VuforiaでつくるスマホAR+VRアプリ
Unity Asset Storeで公開されているVuforia AR+VR Sampleを用いたスマホアプリ作成ハンズオンでのスライド
shinjism
October 13, 2018
Tweet
Share
More Decks by shinjism
See All by shinjism
OpenCVでつくろうARスタンプアプリ for iOS
shinjism
0
130
個人的にお気に入りのVuforia公式サンプル #AR_Fukuoka
shinjism
0
93
A-Frameでお手軽WebAR
shinjism
1
4.1k
日本語でおk?
shinjism
0
220
Other Decks in Technology
See All in Technology
テストアーキテクチャ設計で実現する高品質で高スピードな開発の実践 / Test Architecture Design in Practice
ropqa
3
710
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
20250208_OpenAIDeepResearchがやばいという話
doradora09
PRO
0
170
WAF に頼りすぎない AWS WAF 運用術 meguro sec #1
izzii
0
460
偶然 × 行動で人生の可能性を広げよう / Serendipity × Action: Discover Your Possibilities
ar_tama
1
740
Fintech SREの挑戦 PCI DSS対応をスマートにこなすインフラ戦略/Fintech SRE’s Challenge: Smart Infrastructure Strategies for PCI DSS Compliance
maaaato
0
450
Data-centric AI入門第6章:Data-centric AIの実践例
x_ttyszk
1
370
エンジニアの育成を支える爆速フィードバック文化
sansantech
PRO
3
660
スクラムのイテレーションを導入してチームの雰囲気がより良くなった話
eccyun
0
110
Platform Engineeringは自由のめまい
nwiizo
4
1.9k
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
1.5k
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
1
1.1k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.6k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Gamification - CAS2011
davidbonilla
80
5.1k
RailsConf 2023
tenderlove
29
1k
Scaling GitHub
holman
459
140k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
Side Projects
sachag
452
42k
Become a Pro
speakerdeck
PRO
26
5.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Transcript
None
None
None
None
None
None
None
None
None
None
None
None
None
◼ ◼ ◼ ◼
◼ ◼ ◼ ◼
None
None
None
None
None
None
None
None
None
None
None
None
None
◼ ◼
◼ ◼ ◼
None
None
◼ ◼ ◼
◼
None
◼ ◼
None
None
◼ ◼ ◼ ◼
None
None
None
None
◼ ◼
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { } }
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る // 上下キーの入力を受け取る // X軸とY軸を回転させる } }
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る // 上下キーの入力を受け取る // X軸とY軸を回転させる } }
None
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る float y = Input.GetAxis("Horizontal"); // 上下キーの入力を受け取る // X軸とY軸を回転させる } }
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る float y = Input.GetAxis("Horizontal"); // 上下キーの入力を受け取る // X軸とY軸を回転させる } }
None
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る float y = Input.GetAxis("Horizontal"); // 上下キーの入力を受け取る float x = Input.GetAxis("Vertical") * -1; // X軸とY軸を回転させる } }
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る float y = Input.GetAxis("Horizontal"); // 上下キーの入力を受け取る float x = Input.GetAxis("Vertical") * -1; // X軸とY軸を回転させる } }
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る float y = Input.GetAxis("Horizontal"); // 上下キーの入力を受け取る float x = Input.GetAxis("Vertical") * -1; // X軸とY軸を回転させる transform.Rotate(x, y, 0); } }
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る float y = Input.GetAxis("Horizontal"); // 上下キーの入力を受け取る float x = Input.GetAxis("Vertical") * -1; // X軸とY軸を回転させる transform.Rotate(x, y, 0); } }
/* 省略 */ public class UserHeadRotation : MonoBehaviour { //
オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start () { } // フレームが更新される度に呼ばれる関数 void Update () { // 左右キーの入力を受け取る float y = Input.GetAxis("Horizontal"); // 上下キーの入力を受け取る float x = Input.GetAxis("Vertical") * -1; // X軸とY軸を回転させる transform.Rotate(x, y, 0); } }
◼ ◼
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
◼ ◼ ◼
None
None
None
None
None
None
None
None
None
None
None
None
None
◼ ◼
None
None
None
◼ ◼
◼ ◼
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
◼ ◼
None
None
◼ ◼
None
None
None
None
None
None
None
None
None
◼ ◼
None
None
None
◼ ◼
None
None
◼ ◼
None
None
None
#region PUBLIC_MEMBER_VARIABLES static public bool isFullScreenMode = true; public GameObject[]
AROnlyObjects; public GameObject[] VROnlyObjects; [Range(0.1f, 5.0f)] public float transitionDuration = 1.5f; // seconds public Canvas StereoViewDivider; public Animator m_Astronaut, m_Drone; public bool InAR { get { return mTransitionCursor <= 0.66f; } } #endregion PUBLIC_MEMBER_VARIABLES
#region PUBLIC_MEMBER_VARIABLES static public bool isFullScreenMode = true; public GameObject[]
AROnlyObjects; public GameObject[] VROnlyObjects; [Range(0.1f, 5.0f)] public float transitionDuration = 1.5f; // seconds public Canvas StereoViewDivider; public Animator m_Astronaut, m_Drone; public bool InAR { get { return mTransitionCursor <= 0.66f; } } #endregion PUBLIC_MEMBER_VARIABLES
void UpdateVisibleObjects() { foreach (var go in VROnlyObjects) { go.SetActive(!InAR);
} // Start Astronaut and Drone animations in VR mode if (!InAR) { if (m_Astronaut) { m_Astronaut.SetBool("IsDrilling", !InAR); } if (m_Drone != null) { m_Drone.SetBool("IsScanning", !InAR); m_Drone.SetBool("IsShowingLaser", !InAR); m_Drone.SetBool("IsFacingObject", !InAR); } } }
void UpdateVisibleObjects() { foreach (var go in VROnlyObjects) { go.SetActive(!InAR);
} // Start Astronaut and Drone animations in VR mode if (!InAR) { if (m_Astronaut) { m_Astronaut.SetBool("IsDrilling", !InAR); } if (m_Drone != null) { m_Drone.SetBool("IsScanning", !InAR); m_Drone.SetBool("IsShowingLaser", !InAR); m_Drone.SetBool("IsFacingObject", !InAR); } } }
◼ ◼
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
◼ ◼
None
None
None
None
None
None
None
None
None
None
None
None
None
None
/* 省略 */ public class SceneControllerScript : MonoBehaviour { /*
省略 */ public void OnAssembleButton() { pt = 0f; panelFlag = !panelFlag; } // ドアを開ける関数 // ドアを閉める関数 }
/* 省略 */ public class SceneControllerScript : MonoBehaviour { /*
省略 */ public void OnAssembleButton() { pt = 0f; panelFlag = !panelFlag; } // ドアを開ける関数 public void OpenDoor () { dt = 0f; doorFlag = true; } // ドアを閉める関数 public void CloseDoor () { dt = 1f; doorFlag = false; } }
None
None
None
None
None
None
#region PRIVATE_MEMBER_VARIABLES float mFocusedTime; bool mTriggered; TransitionManager mTransitionManager; Transform cameraTransform;
#endregion // PRIVATE_MEMBER_VARIABLES /* 省略 */ // オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start() { cameraTransform = Camera.main.transform; mTransitionManager = FindObjectOfType<TransitionManager>(); GetComponent<Renderer>().material = nonFocusedMaterial; }
#region PRIVATE_MEMBER_VARIABLES float mFocusedTime; bool mTriggered; TransitionManager mTransitionManager; Transform cameraTransform;
SceneControllerScript danbocchi; #endregion // PRIVATE_MEMBER_VARIABLES /* 省略 */ // オブジェクトが有効になった時に1度だけ呼ばれる関数 void Start() { cameraTransform = Camera.main.transform; mTransitionManager = FindObjectOfType<TransitionManager>(); GetComponent<Renderer>().material = nonFocusedMaterial; danbocchi = GetComponent<SceneControllerScript>(); }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; danbocchi.OpenDoor(); // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
◼ ◼
None
None
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; danbocchi.OpenDoor(); // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator TransitionXRMode() { // ドアを開く // ドアが開くまで待つ(1秒待機) // AR←→VRの移行 } private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator TransitionXRMode() { // ドアを開く // ドアが開くまで待つ(1秒待機) // AR←→VRの移行 } private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator TransitionXRMode() { // ドアを開く danbocchi.OpenDoor(); // ドアが開くまで待つ(1秒待機) // AR←→VRの移行 } private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator TransitionXRMode() { // ドアを開く danbocchi.OpenDoor(); // ドアが開くまで待つ(1秒待機) // AR←→VRの移行 } private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator TransitionXRMode() { // ドアを開く danbocchi.OpenDoor(); // ドアが開くまで待つ(1秒待機) // AR←→VRの移行 bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); } private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator TransitionXRMode() { // ドアを開く danbocchi.OpenDoor(); // ドアが開くまで待つ(1秒待機) // AR←→VRの移行 bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); } private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator TransitionXRMode() { // ドアを開く danbocchi.OpenDoor(); // ドアが開くまで待つ(1秒待機) yield return new WaitForSeconds(1.0f); // AR←→VRの移行 bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); } private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; danbocchi.OpenDoor(); // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; danbocchi.OpenDoor(); // Activate transition from AR to VR or vice versa bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; // AR←→VR移行をコルーチンとして呼び出す }
// フレームが更新される度に呼ばれる関数 void Update() { /* 省略 */ if (Focused)
{ // Update the "focused state" time mFocusedTime += Time.deltaTime; if ((mFocusedTime > activationTime) || startAction) { mTriggered = true; mFocusedTime = 0; // AR←→VR移行をコルーチンとして呼び出す StartCoroutine(TransitionXRMode()); }
◼ ◼
None
None
#region PRIVATE_METHODS private void UpdateMaterials(bool focused) { /* 省略 */
} private IEnumerator TransitionXRMode() { // ドアを開く danbocchi.OpenDoor(); // ドアが開くまで待つ(1秒待機) yield return new WaitForSeconds(1.0f); // AR←→VRの移行 bool goingBackToAR = (triggerType == TriggerType.AR_TRIGGER); mTransitionManager.Play(goingBackToAR); StartCoroutine( ResetAfter(0.3f * mTransitionManager.transitionDuration) ); } private IEnumerator ResetAfter(float seconds) { /* 省略 */ } #endregion // PRIVATE_METHODS
private IEnumerator ResetAfter(float seconds) { Debug.Log("Resetting View trigger after: "
+ seconds); yield return new WaitForSeconds(seconds); Debug.Log("Resetting View trigger: " + name); // Reset variables mTriggered = false; mFocusedTime = 0; Focused = false; UpdateMaterials(false); }
private IEnumerator ResetAfter(float seconds) { Debug.Log("Resetting View trigger after: "
+ seconds); yield return new WaitForSeconds(seconds); Debug.Log("Resetting View trigger: " + name); // ドアを閉じる // Reset variables mTriggered = false; mFocusedTime = 0; Focused = false; UpdateMaterials(false); }
private IEnumerator ResetAfter(float seconds) { Debug.Log("Resetting View trigger after: "
+ seconds); yield return new WaitForSeconds(seconds); Debug.Log("Resetting View trigger: " + name); // ドアを閉じる danbocchi.CloseDoor(); // Reset variables mTriggered = false; mFocusedTime = 0; Focused = false; UpdateMaterials(false); }
◼ ◼
None
None
None
None
◼ ◼
None
None
None
None
None
None
None
/* 省略 */ public class SceneControllerScript : MonoBehaviour { /*
省略 */ public void OnAssembleButton() { pt = 0f; panelFlag = !panelFlag; } // ドアを開ける関数 public void OpenDoor () { dt = 0f; doorFlag = true; } // ドアを閉める関数 public void CloseDoor () { dt = 1f; doorFlag = false; } }
/* 省略 */ public class SceneControllerScript : MonoBehaviour { /*
省略 */ public void OnAssembleButton() { pt = 0f; panelFlag = !panelFlag; } // ドアを開ける関数 public void OpenDoor () { dt = 0f; doorFlag = true; GetComponent<AudioSource>().Play(); } // ドアを閉める関数 public void CloseDoor () { dt = 1f; doorFlag = false; } }
◼ ◼
None
None
None
◼ ◼ ◼ ◼
None
None
None
None
◼ ◼
None
None
None
None
None
None
None
None
◼ ◼
◼ ◼ ◼
None
◼ ◼
None
None
None
None
None
None
None
None
None
◼ ◼
None
None
◼ ◼ ◼