プレーヤー②(プレーヤーを動かす)

Playerを動かす
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public float moveSpeed = 0.2f;
void Update()
{
float moveH = Input.GetAxis("Horizontal") * moveSpeed;
float moveV = Input.GetAxis("Vertical") * moveSpeed;
transform.Translate(moveH, 0, moveV);
}
}

【2021版】Danmaku(基礎/全55回)
他のコースを見る
Playerを動かす
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public float moveSpeed = 0.2f;
void Update()
{
float moveH = Input.GetAxis("Horizontal") * moveSpeed;
float moveV = Input.GetAxis("Vertical") * moveSpeed;
transform.Translate(moveH, 0, moveV);
}
}

プレーヤー②(プレーヤーを動かす)