123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using UnityEngine;
- public class OvrUIPen : MonoBehaviour
- {
- private void Awake()
- {
- this.m_trParent = base.transform.parent;
- this.m_vParentBackPos = this.m_trParent.localPosition;
- }
- private void OnEnable()
- {
- if (OvrIK.IsModeVRIK)
- {
- if (this.m_ctrl != null)
- {
- if (this.m_ctrl.m_bHandL)
- {
- this.m_trParent.localPosition = new Vector3(0.0298f, -0.036f, this.m_trParent.localPosition.z);
- }
- else
- {
- this.m_trParent.localPosition = new Vector3(-0.0326f, this.m_trParent.localPosition.y, this.m_trParent.localPosition.z);
- }
- }
- }
- else
- {
- this.m_trParent.localPosition = this.m_vParentBackPos;
- }
- }
- public AVRControllerBehavior m_ctrl;
- private Transform m_trParent;
- private Vector3 m_vParentBackPos;
- }
|