

VR Shared

https://doc.photonengine.com/ko-kr/fusion/current/technical-samples/fusion-vr-shared
VR Shared | Photon Engine
Fusion VR Shared 는 VR 기능이 있는 멀티플레이어 게임 또는 애플리케이션의 쉽고 빠른 시작법에 대해 설명합니다. 공유 토폴로지 또는 호스트/서버 토폴로지 중 어떤 것을 선택할지는 게임 사양에
doc.photonengine.com
Oculus VR 세팅




















csharp
닫기using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HardwareRig : MonoBehaviour
{
public HardwareHead headSet;
public HardwareHand leftHand;
public HardwareHand rightHand;
public NetworkRig networkRig;
private void Update()
{
this.networkRig.headSet.SetLocalPosition(this.headSet.transform.localPosition);
this.networkRig.headSet.SetLocalRotation(this.headSet.transform.localRotation);
this.networkRig.leftHand.SetLocalPosition(this.leftHand.transform.localPosition);
this.networkRig.leftHand.SetLocalRotation(this.leftHand.transform.localRotation);
this.networkRig.rightHand.SetLocalPosition(this.rightHand.transform.localPosition);
this.networkRig.rightHand.SetLocalRotation(this.rightHand.transform.localRotation);
}
}
csharp
닫기using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NetworkRig : MonoBehaviour
{
public NetworkHead headSet;
public NetworkHand leftHand;
public NetworkHand rightHand;
private void Awake()
{
var hardwareRig = GameObject.FindObjectOfType<HardwareRig>();
hardwareRig.networkRig = this;
}
}
csharp
닫기using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NetworkHead : MonoBehaviour
{
public void SetLocalPosition(Vector3 pos)
{
this.transform.localPosition = pos;
}
public void SetLocalRotation(Quaternion rot)
{
this.transform.localRotation = rot;
}
}
csharp
닫기using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NetworkHand : MonoBehaviour
{
public void SetLocalPosition(Vector3 pos)
{
this.transform.localPosition = pos;
}
public void SetLocalRotation(Quaternion rot)
{
this.transform.localRotation = rot;
}
}
'Photon' 카테고리의 다른 글
[Photon] Photon Transform View, Photon Animator View (1) | 2023.11.27 |
---|---|
[Photon] Player Settings, 포스트 프로세싱, 포톤 프로젝트 설정 (1) | 2023.11.24 |
[Photon] 포톤 클라우드 어플리케이션 생성 (0) | 2023.11.24 |