บทเรียน
ตัวอย่างโลกที่ใช้การเคลื่อนที่ของวัตถุและการจัดการสิ่งกีดขวาง
38 นาที
ตัวอย่างโครงการ 📘 ไฟล์โครงการที่ใช้ในวิดีโอการบรรยาย https //github com/naverz/zepeto world sample/tree/main/assets/chapter1 สรุป สรุป นี่คือการบรรยายที่ติดตามสำหรับผู้เริ่มต้นในการพัฒนา zepeto world ตั้งค่าเพื่อการพัฒนา zepeto world และเรียนรู้การควบคุมตัวละคร zepeto มันคือ jump map ที่สามารถทำได้ด้วยโค้ดการเคลื่อนที่ gameobject ที่ง่ายและโค้ดการโทร ความยาก ผู้เริ่มต้น เวลาที่ต้องใช้ 30 นาที เป้าหมายของโครงการ เข้าใจวิธีการสร้างโปรเจกต์ unity โดยใช้เทมเพลต zepeto การทำงานร่วมกันของ world id และการเข้าสู่ระบบ zepeto เรียกตัวละคร zepeto และเข้าใจตัวควบคุมตัวละคร สร้าง jump maps เริ่มต้น ควบคุมการเคลื่อนไหวของ gameobjects โดยใช้สคริปต์ zepeto โทรลักษณ์โดยใช้สคริปต์ zepeto ตัวอย่างของโลกที่เสร็จสมบูรณ์ https //www youtube com/watch?v=i4zmjqpn7zw ส่วนที่ 1 การตั้งค่าคอนโซลโลก ❗️ ระวัง ก่อนดูวิดีโอนี้ กรุณาทำตาม docid\ yejxazjcqx5zqcdfj74qu คู่มือ เพื่อทำการติดตั้งพื้นฐานให้เสร็จสิ้น เรียนรู้วิธีการตั้งค่าคอนโซลโลก zepeto studio เรียนรู้วิธีการตั้งค่าโปรเจกต์ unity โดยใช้เทมเพลต zepeto เวอร์ชันภาษาอังกฤษ https //www youtube com/watch?v=qlv1z723gem เวอร์ชันภาษาเกาหลี https //www youtube com/watch?v=jqpu5azn0wo ส่วนที่ 2 การตั้งค่า zepeto ผู้เล่น เรียนรู้วิธีทำให้ตัวละคร zepeto ปรากฏในโลก เวอร์ชันภาษาอังกฤษ https //www youtube com/watch?v=gsw jxi4c6q เวอร์ชันภาษาเกาหลี 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=hxr9bexwb60 สคริปต์ rotator 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=hhakkpgt2vm teleport script 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 character object zepetoplayers instance onaddedlocalplayer addlistener(() => { this zepetocharacter = zepetoplayers instance localplayer zepetoplayer character; }); } ontriggerenter(collider collider) { if (this zepetocharacter == null || collider gameobject != this zepetocharacter gameobject) { return; } // teleport to origin position this zepetocharacter teleport(new vector3(0, 0, 0), quaternion identity); } } ส่วนที่ 5 ทดสอบการเล่น เรียนรู้วิธีการทดสอบการเล่นบนมือถือ เวอร์ชันภาษาอังกฤษ https //www youtube com/watch?v=wfwao8uzlsc เวอร์ชันภาษาเกาหลี https //www youtube com/watch?v=ixj2z47wp k ส่วนที่ 6 การใช้ asset store เรียนรู้วิธีการตกแต่งโลกของคุณอย่างหรูหรา เวอร์ชันภาษาอังกฤษ https //www youtube com/watch?v=xfmrcr skjy เวอร์ชันภาษาเกาหลี https //www youtube com/watch?v=nq10qeyec1m ส่วนที่ 7 การเปิดตัวโลก เรียนรู้วิธีการเปิดตัวโลก เวอร์ชันภาษาอังกฤษ https //www youtube com/watch?v=cnloh28ezf8 เวอร์ชันภาษาเกาหลี https //www youtube com/watch?v=trgrk3gezwo

