1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using SC.XR.Unity;
- using SC.XR.Unity.Module_InputSystem;
- using static API_GSXR_Slam;
- using UnityEngine;
- using TMPro;
- public class NoloControllerInfo : ControllerInfoBase
- {
- [SerializeField]
- protected TextMeshProUGUI Text_speed_1;
- [SerializeField]
- protected TextMeshProUGUI Text_speed_2;
- float[] ori = new float[15];
- protected new void Start()
- {
- base.Start();
-
- }
- protected new void Update()
- {
- base.Update();
- ShowSpeed();
- }
- private void ShowSpeed()
- {
-
- if (is_Left)
- {
-
- API_GSXR_Slam.plugin.GSXR_Get_ControllerPosture(ori, 0);
- }
- else
- {
- API_GSXR_Slam.plugin.GSXR_Get_ControllerPosture(ori, 1);
- }
- Vector3 speed_1 = new Vector3(ori[7], ori[8], ori[9]);
- Vector3 speed_2 = new Vector3(ori[10], ori[11], ori[12]);
- Text_speed_1.text = speed_1.ToString("f3");
- Text_speed_2.text = speed_2.ToString("f3");
- }
- }
|