Init
This commit is contained in:
16
Assets/GameFramework/Runtime/Network/VRPlayerRig.cs
Normal file
16
Assets/GameFramework/Runtime/Network/VRPlayerRig.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user