Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Web+スマホ+VRで一人ブレストアプリを作ってみた

 Web+スマホ+VRで一人ブレストアプリを作ってみた

4bf9f85356f5a7c959b73f19f4c0df37?s=128

masarufuruya

June 21, 2017
Tweet

More Decks by masarufuruya

Other Decks in Technology

Transcript

  1. Web+εϚϗ+VRͰ ҰਓϒϨετΞϓϦΛ࡞ͬͯΈͨ

  2. Hello! I AM MASARU FURUYA Ruby/React ϑϦʔϥϯε @enzerubank

  3. εϚϗ͔Βొ࿥ͨ͠ΩʔϫʔυΛ෇ᝦԽ Oculus TouchͰಈ͔ͤΔϒϨετΞϓϦ

  4. ΞδΣϯμ ◦ΞΠσΞग़͠ ◦ཁ݅ఆٛ ◦ቕΓϙΠϯτᶃ: JSONύʔε ◦ቕΓϙΠϯτᶄ: VR্ͷςΩετදࣔ ◦ቕΓϙΠϯτᶅ: PositionͱlocalPosition ◦·ͱΊ

  5. 1. ΞΠσΞग़͠

  6. ΞΠσΞ͠ΓͱΓ A (ςʔϚ) × B (͠ΓͱΓ) = C (ΞΠσΞ)Ͱ 50ݸग़ͨ͠ΞΠσΞΛ5ݸʹߜΔ

  7. 2. ཁ݅ఆٛ

  8. ϑΥʔΧεେࣄ εϚϗΞϓϦͱOculus͸طଘίʔυΛྲྀ༻ ৽ͨʹ࡞Δͷ͸JSON͔Β෇ᝦΛੜ੒͢ΔػೳͷΈ

  9. ͜ΕͳΒ ָউͰ͸ʁ

  10. ͦΜͳ͜ͱ͸ແ͔ͬͨ

  11. 3. ቕ·ΓϙΠϯτᶃ: JSONύʔε

  12. JsonUtility೉͍͠ ◦ ߏ଄ମͱSerializableͷཧղ͕ඞཁ

  13. LitJson͸ॳ৺ऀ޲͖ ◦ ߏ଄ମෆཁͰɺJson -> ObjectʹύʔεՄ

  14. 4. ቕ·ΓϙΠϯτᶄ: VR্ͷςΩετදࣔ

  15. ςΩετ͕ϘέΔ ࡍͷରԠࡦ 1. ϑΥϯταΠζΛେ͖Ί ʹ͢Δ(໨҆: 50ʙ200) 2. GameViewΛ޿͘͢Δ ※ ϑΥϯτΛେ͖ͯ͘͠දࣔ͞Εͳ͍৔߹͸width/heightΛௐ੔͢Δ

  16. ςΩετ͕େ͖͗͢Δ ࡍͷରԠࡦ Canvasʹൺྫ͢ΔͷͰςΩετͷ scaleΛۃগʹ͢Δ(໨҆: 0.xʙ)

  17. 5. ቕ·ΓϙΠϯτᶅ: PositionͱlocalPosition

  18. localPosition͸ ਌ͷscaleʹൺྫ͢Δ ਌ͷscale͕0.1ͷ৔߹ɺ local: global = 200px : 20px

  19. ·ͱΊ ◦ ωλग़͠͸ΞΠσΞ͠ΓͱΓΛ࢖͏ ◦ ৽͘͠࡞Δػೳ͸1ݸʹϑΥʔΧε͢Δ ◦ ·ͣ͸LitJsonɺ׳ΕͨΒJsonUtility ◦ uGUI͸ϑΥϯτɾදࣔൣғɾscaleΛௐ੔͢Δ ◦

    localPostion͸਌ͷscaleͱൺྫ͢Δ