12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.XR;
- using Valve.VR;
- public class AttachBikeToHead : MonoBehaviour
- {
- public Transform playerTransform;
- public Transform cameraTransform;
- public Transform bikeTransform;
- public float headHeihgt = 1.4f;
- public SteamVR_Action_Boolean resetAction;
- private SteamVR_Render render;
-
- private float initialBikeY;
-
- void Start()
- {
- render = FindObjectOfType<SteamVR_Render>();
-
- ResetPositionAndRotation();
- }
- private void ResetPositionAndRotation()
- {
-
-
-
-
-
-
-
- }
- private void OnStateUp(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource)
- {
- ResetPositionAndRotation();
- }
- }
|