我遵循这个统一的虚拟现实YT。关于一个枪支技工的教程视频,但我知道这个错误吗?有人能帮我吗?(https://www.youtube.com/watch?v=IX2EUAcocoM&t)
谢谢你的帮助:
using System.Collections;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
public class Weapon : XRGrabInteractable
{
private GripHold gripHold = null;
private XRBaseInteractor gripHand = null;
private readonly Vector3 gripRotation = new Vector3(45, 0, 0);
protected override void Awake()
{
base.Awake();
SetupHolds();
onSelectEnter.AddListener(SetInitialRotation);
}
private void SetupHolds()
{
gripHold = GetComponentInChildren<GripHold>();
gripHold.Setup(this);
}
private void SetupExtras()
{
}
private void OnDestroy()
{
onSelectEnter.RemoveListener(SetInitialRotation);
}
private void SetInitialRotation(XRBaseInteractor interactor)
{
Quaternion newRotation = Quaternion.Euler (gripRotation);
interactor.attachTransform.localRotation = newRotation;
}
public void SetGripHand(XRBaseInteractor interactor)
{
gripHand = interactor;
OnSelectEnter(gripHand);
}
public void ClearGripHand(XRBaseInteractor interactor)
{
gripHand = null;
OnSelectExit(interactor);
}
public void SetGuardHand(XRBaseInteractor interactor)
{
}
public void ClearGuardHand(XRBaseInteractor interactor)
{
}
public override void ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase updatePhase)
{
base.ProcessInteractable(updatePhase);
}
private void SetGripRotation()
{
}
private void CheckDistance(XRBaseInteractor interactor, HandHold handHold)
{
}
public void PullTrigger()
{
}
public void ReleaseTrigger()
{
}
public void ApplyRecoil()
{
}
}
*(这只是一些测试的细节,因为我不能发布。如果有东西丢失了A szőke fiúleereszkedett a sziklafok nény utolsóméterén,s elindult a lagúna felé。Noha levetette iskolai szvetterét,s a fél kezével a magaán húzta a f ld n,átizzadt,szürke inge a testéhez ragadt,haja是homlokára tapadt。kül tte a dzsungelbe benyúlóhosszúnyiladék forróvolt,薄荷a gőzfürdő。Nehézkesen botladozott a kúszónényekés a ledőrzsek k z tt,amikor boszorkánysivításszerűhangot hirtelen egyár vágódott felőtte,mint egy v r ssárga látomás;sivításra egy másik hang
)*
https://stackoverflow.com/questions/70239430
复制相似问题