private void HandleRoll(Vector3 towardGravity) { float angle = Vector3.SignedAngle(Vector3.down, towardGravity, Vector3.forward); float relativeAmount = angle / ANGLE_MAX; _Roll.Invoke(RelativeInputEvent.WithinFullRange(relativeAmount)); }
private void HandlePitch(Vector3 towardGravity) { float angle = Vector3.SignedAngle(Vector3.forward, towardGravity, Vector3.right); float relativeAmount = angle / ANGLE_MAX; _Pitch.Invoke(RelativeInputEvent.WithinFullRange(relativeAmount)); }
private void NotifyNewInput() { float value = RelativeInputEvent.WithinFullRange(Curve.Evaluate(_TimeSeconds)); InputConsumers.Invoke(value); }
private void FireTouchEvents(float domainValue) { TouchEventListeners.Invoke(domainValue); }