private void Start() { _audioSource = GetComponent <AudioSource>(); _hand = GetComponentInParent <Hand>(); _centerHandFeature = GetComponent <CenterHandFeature>(); _centerHandFeature.OnEngagedEvent.AddListener(OnGrab); _centerHandFeature.OnDisengagedEvent.AddListener(OnRelease); _priorPos = ComputePriorPosition(); _idleSprite.enabled = false; _idleContactSprite.enabled = false; _hoverSprite.enabled = false; _grabSprite.enabled = false; }
private void Start() { _audioSource = GetComponent <AudioSource>(); _hand = GetComponentInParent <Hand>(); _centerHandFeature = GetComponent <CenterHandFeature>(); _centerHandFeature.OnEngagedEvent.AddListener(OnGrab); _centerHandFeature.OnDisengagedEvent.AddListener(OnRelease); _headsetTransform = metaContext.Get <IEventCamera>().EventCameraRef.transform; _idleSprite.enabled = false; _idleContactSprite.enabled = false; _hoverSprite.enabled = false; _grabSprite.enabled = false; }
private void Awake() { _centerHandFeature = GetComponent <CenterHandFeature>(); CandidatePosition = _centerHandFeature.transform.position; }