I am trying to center the view to the mouse point in a Python modal operator. However, I just couldn't find the right operator in the API documentation.
https://docs.blender.org/api/current/bpy.ops.view3d.html
I found bpy.ops.view3d.view_selected() and using it like this
elif event.type in {'MIDDLEMOUSE'}:
if event.alt:
bpy.ops.view3d.view_selected()
does center on the selected object which is a similar operation but not exactly what I wanted. Basically I would like to perform the same operation Blender is calling when pressing ALT+MIDDLEMOUSE in the 3D viewport ("Center View to Mouse").
Anyone knows the right operator for this?