1 using System.Collections;
 
    2 using System.Collections.Generic;
 
   13         [Header(
"Throttle Lever Properties")]
 
   16         public RectTransform parentRect;
 
   17         public RectTransform handleRect;
 
   18         private float handleSpeed = 2f;
 
   25         #region Interface Methods 
   31             if(input && parentRect && handleRect)
 
   33                 float height = parentRect.rect.height;
 
   34                 Vector2 wantedHandlePosition = 
new Vector2(0f, height/2 * input.Yaw);
 
   35                 handleRect.anchoredPosition = Vector2.Lerp(handleRect.anchoredPosition, wantedHandlePosition, Time.deltaTime * handleSpeed);