123456789101112131415161718192021222324252627 |
- using Controller.Bicycle;
- using UnityEngine;
- using Valve.VR;
- namespace Controller
- {
- public class ViveBikeController : MonoBehaviour
- {
- public SteamVR_Action_Pose steerPose;
- public float multiplier = 40f;
- private WcBicycleController wcBicycleController;
-
- // Start is called before the first frame update
- void Start()
- {
- wcBicycleController = GetComponent<WcBicycleController>();
- }
- // Update is called once per frame
- void Update()
- {
- var rot = steerPose.localRotation.y;
- wcBicycleController.CurrentSteerAngle = rot * multiplier;
- }
- }
- }
|