/// <summary> /// Gets direction of the positional input multiplied with the intensity. Will be a zero vector most of the time, use overload with IVectorMovementInputArgs instead. /// </summary> /// <param name="args">Arguments of the input event.</param> /// <returns>Direction of the input.</returns> public static Vector2 GetDirection(IIntensityTriggerArgs args) => (args.EndPos - args.StartPos) * args.Intensity;
/// <summary> /// Gets magnitude of the positional input multiplied with the intensity. Will be zero most of the time, use overload with IDeltaMovementInputArgs or IVectorMovementInputArgs instead. /// </summary> /// <param name="args">Arguments of the input event.</param> /// <returns>Magnitude of the input.</returns> public static float GetMagnitude(IIntensityTriggerArgs args) => GetDirection(args).magnitude *args.Intensity;
/// <summary> /// Gets start position added with the direction multiplied by the intensity of the input. /// </summary> /// <param name="args">Arguments of the input event.</param> /// <returns>Focus point of the input.</returns> public static Vector2 GetFocusPoint(IIntensityTriggerArgs args) => args.StartPos + GetDirection(args) * args.Intensity;