Beispiel #1
0
    void Update()
    {
        if (isHittingTarget)
        {
            return;
        }

        LaserVisual.SetDistance(defaultReticleDistance);
    }
Beispiel #2
0
 public override void OnPointerHover(RaycastResult raycastResult, bool isInteractive)
 {
     LaserVisual.SetDistance(raycastResult.distance);
     isHittingTarget = true;
 }
Beispiel #3
0
 protected override void Start()
 {
     base.Start();
     LaserVisual.GetPointForDistanceFunction = GetPointAlongPointer;
     LaserVisual.SetDistance(defaultReticleDistance, true);
 }
 /// <inheritdoc/>
 public override void OnPointerHover(RaycastResult raycastResult, bool isInteractive)
 {
     LaserVisual.SetDistance(raycastResult.distance);
     isHittingTarget = true;
     Debug.Log("Raycast" + raycastResult.worldPosition.ToString());
 }