Files
VR-WuKong/Assets/GameFramework/Runtime/Network/VRPlayerRig.cs
2025-11-13 17:40:28 +08:00

17 lines
640 B
C#

using UnityEngine;
public class VRPlayerRig : MonoBehaviour
{
public Transform headTransform;
public VRNetworkPlayerScript localVRNetworkPlayerScript;
private void Update()
{
if (localVRNetworkPlayerScript)
{
// presuming you want a head object to sync, optional, same as hands.
localVRNetworkPlayerScript.headTransform.position = new Vector3(this.headTransform.position.x, this.headTransform.position.y - 1.25f, this.headTransform.position.z);
localVRNetworkPlayerScript.headTransform.eulerAngles = new Vector3(0, this.headTransform.eulerAngles.y, 0);
}
}
}