Teachers open the door but You must enter by yourself.
【事前学習】前回学んだ機能を再確認しておきましょう。
| オブジェクト名 | 種類 | 値 |
|---|---|---|
| MainCamera | N/A | Position(0,10,-10) Rotation(45,0,0) |
using UnityEngine;
public class CameraController : MonoBehaviour
{
Transform player;
Vector3 offset;
void Start(){
//camera位置-Player位置
offset = transform.position - player.position;
}
void LateUpdate(){
//camera位置=Player位置+offset
transform.position = player.position + offset;
}
}
| オブジェクト名 | 種類 | 値 | Material |
|---|---|---|---|
| West Wall | Cube | Position(-10.1,0) Scale(0.5, 2, 20.5) | BaseMap(79,79,79) Metallic Map 0 Smoothness 0.25 |
【事後学習】本日学んだ機能を再確認しておきましょう。
This site is powered by