カメラの方向にキャラの向きを合わせる

カメラとキャラの向きを合致させる
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 追加
using Photon.Pun;
public class PlayerHeadController : MonoBehaviourPunCallbacks // 変更
{
void Update()
{
if(photonView.IsMine)
{
var rotationHorizontal = Quaternion.AngleAxis(Camera.main.transform.eulerAngles.y, Vector3.up);
transform.rotation = rotationHorizontal;
}
}
}






【2020版】BattleOnline(基礎/全34回)
他のコースを見る
カメラとキャラの向きを合致させる
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 追加
using Photon.Pun;
public class PlayerHeadController : MonoBehaviourPunCallbacks // 変更
{
void Update()
{
if(photonView.IsMine)
{
var rotationHorizontal = Quaternion.AngleAxis(Camera.main.transform.eulerAngles.y, Vector3.up);
transform.rotation = rotationHorizontal;
}
}
}






カメラの方向にキャラの向きを合わせる