チュートリアル
オブジェクトの移動と障害物の操作を使用した世界の例
38分
サンプルプロジェクト 📘 講義ビデオで使用されるプロジェクトファイル https //github com/naverz/zepeto world sample/tree/main/assets/chapter1 https //github com/naverz/zepeto world sample/tree/main/assets/chapter1 概要 概要 これはzepeto world開発の初心者向けの講義です。 \ zepeto world開発のセットアップとzepetoキャラクターコントローラーの学習。 \ 簡単なgameobject移動コードとテレポートコードで完成できるジャンプマップです。 難易度 初心者 必要な時間 30分 プロジェクトの目標 zepetoテンプレートを使用してunityプロジェクトを作成する方法を理解する world idの相互運用性とzepetoログイン zepetoキャラクターを呼び出し、キャラクターコントローラーを理解する デフォルトのジャンプマップを作成する zepetoスクリプトを使用してgameobjectの動きを制御する zepetoスクリプトを使用してキャラクターをテレポートする 完成したワールドの例 https //www youtube com/watch?v=i4zmjqpn7zw https //www youtube com/watch?v=i4zmjqpn7zw パート1 ワールドコンソールの設定 ❗️ 注意 このビデオを見る前に、次の インストールと設定 docid\ bttfq41zakuoxpzg6nlkz ガイド を完了してください。 zepetoスタジオワールドコンソールの設定方法を学ぶ。 zepetoテンプレートを使用してunityプロジェクトを設定する方法を学ぶ。 英語版 https //www youtube com/watch?v=qlv1z723gem https //www youtube com/watch?v=qlv1z723gem 韓国語版 https //www youtube com/watch?v=jqpu5azn0wo https //www youtube com/watch?v=jqpu5azn0wo パート2 zepetoプレイヤーの設定 zepetoキャラクターを世界に表示する方法を学びましょう。 英語版 https //www youtube com/watch?v=gsw jxi4c6q https //www youtube com/watch?v=gsw jxi4c6q 韓国語版 https //www youtube com/watch?v=zmwd1qhlyp8 https //www youtube com/watch?v=zmwd1qhlyp8 charactercontrollerスクリプト import { zepetoscriptbehaviour } from 'zepeto script'; import { spawninfo, zepetoplayers, localplayer, zepetocharacter } from 'zepeto character controller'; export default class charactercontroller extends zepetoscriptbehaviour { start() { zepetoplayers instance createplayerwithzepetoid("", "\[zepeto id]", new spawninfo(), true); zepetoplayers instance onaddedlocalplayer addlistener(() => { let player localplayer = zepetoplayers instance localplayer; }); } } パート3 動くオブジェクト 動くgameobjectの作成方法を学ぶ。 英語版 https //www youtube com/watch?v=ecw59kg0jos https //www youtube com/watch?v=ecw59kg0jos 韓国語版 https //www youtube com/watch?v=hxr9bexwb60 https //www youtube com/watch?v=hxr9bexwb60 rotator script import { zepetoscriptbehaviour } from 'zepeto script'; export default class rotator extends zepetoscriptbehaviour { public rotationspeedx number = 0 5; public rotationspeedy number = 0; public rotationspeedz number = 0; update() { this transform rotate(this rotationspeedx, this rotationspeedy, this rotationspeedz); } } movement script import { zepetoscriptbehaviour } from 'zepeto script'; import { vector3, gameobject, object, time } from 'unityengine'; export default class movement extends zepetoscriptbehaviour { public movingtime number = 1; public movingrangex number = 0; public movingrangey number = 2; private delta number = 0; private directionflag bool = true; update() { this delta += time deltatime; if (this delta > this movingtime) { this delta = 0; this directionflag = !this directionflag; } if (this directionflag) { // move upward during the set moving time this transform translate(this movingrangex time deltatime, this movingrangey time deltatime, 0); } else { // move downward during the set moving time this transform translate( 1 this movingrangex time deltatime, 1 this movingrangey time deltatime, 0); } } } パート4 zepetoキャラクターのテレポート オブジェクトに到達したときにキャラクターをテレポートさせる方法を学ぶ。 英語版 https //www youtube com/watch?v=8lxwq7k23uy https //www youtube com/watch?v=8lxwq7k23uy 韓国語版 https //www youtube com/watch?v=hhakkpgt2vm https //www youtube com/watch?v=hhakkpgt2vm テレポートスクリプト import { collider,vector3,quaternion } from 'unityengine'; import { zepetocharacter, zepetoplayer, zepetoplayers } from 'zepeto character controller'; import { zepetoscriptbehaviour } from 'zepeto script'; export default class teleport extends zepetoscriptbehaviour { private zepetocharacter zepetocharacter; start() { // zepetoキャラクターオブジェクト zepetoplayers instance onaddedlocalplayer addlistener(() => { this zepetocharacter = zepetoplayers instance localplayer zepetoplayer character; }); } ontriggerenter(collider collider) { if (this zepetocharacter == null || collider gameobject != this zepetocharacter gameobject) { return; } // 原点位置にテレポート this zepetocharacter teleport(new vector3(0, 0, 0), quaternion identity); } } パート5 テストプレイ モバイルでのテストプレイの方法を学ぶ。 英語版 https //www youtube com/watch?v=wfwao8uzlsc https //www youtube com/watch?v=wfwao8uzlsc 韓国語版 https //www youtube com/watch?v=ixj2z47wp k https //www youtube com/watch?v=ixj2z47wp k 第6部 アセットストアの活用 あなたのワールドを贅沢に装飾する方法を学びましょう。 英語版 https //www youtube com/watch?v=xfmrcr skjy https //www youtube com/watch?v=xfmrcr skjy 韓国語版 https //www youtube com/watch?v=nq10qeyec1m https //www youtube com/watch?v=nq10qeyec1m 第7部 ワールドの立ち上げ ワールドを立ち上げる方法を学びましょう。 英語版 https //www youtube com/watch?v=cnloh28ezf8 https //www youtube com/watch?v=cnloh28ezf8 韓国語版 https //www youtube com/watch?v=trgrk3gezwo https //www youtube com/watch?v=trgrk3gezwo