Godot Version
v4.6.1.stable.mono.official [14d19694e]
Question
I have this piece of code in my main camera object:
public override void _UnhandledInput(InputEvent @event)
{
if (GameFlags.IsDialogueOpen)
{
return;
}
switch (@event)
{
case InputEventMagnifyGesture magnify:
{
_isFollowingTarget = false;
float newZoomFactor = _targetZoom.X * magnify.Factor;
float clampedZoom = Mathf.Clamp(newZoomFactor, MinZoom, MaxZoom);
_targetZoom = new Vector2(clampedZoom, clampedZoom);
break;
}
case InputEventScreenDrag drag:
{
_isFollowingTarget = false;
_targetPosition = Position - (drag.Relative / Zoom.X);
Position = _targetPosition;
ClampPosition();
break;
}
}
}
And this code works EXACTLY as you’d expect on Android devices, but on iOS it seems like the magnify event is never even recognized. Why? Am I doing something wrong? The documentation says absolutely nothing about iOS not supporting this.