So the method rotated
for Transform
returns a new Transform
with the appropriate rotation. To make use of that returned value, you would want to put the following into your code:
transform = transform.rotated(Vector3(1.0, 0.0, 0.0), deg2rad(event.relative.y * 0.1))