Exemplo n.º 1
0
    /// <inheritdoc />
    public override void OnUpdate()
    {
        var movement = Vector2.Zero;
        var rotation = Vector2.Zero;

        if (VirtualThumbStick_Left != null)
        {
            movement = VirtualThumbStick_Left.Get <VirtualThumbStick>().Input *Strength_Left;
        }

        if (VirtualThumbStick_Right != null)
        {
            rotation = VirtualThumbStick_Right.Get <VirtualThumbStick>().Input *Strength_Right;
        }

        if (!InvertLookUp)
        {
            rotation.Y *= -1;
        }
        Camera?.AddMovementRotation(movement.X, movement.Y, rotation.Y, rotation.X);
    }