A powerful, ultra-smooth OBS Lua script that dynamically zooms your display capture and precisely follows your mouse cursor.
✨ Modernized & Updated: This is an enhanced fork optimized and updated for the latest OBS Studio versions by Timexo, originally built by BlankSourceCode.
| Feature | Description |
|---|---|
| 🚀 Ultra-Smooth Zoom | Fluid, animated zoom transitions directly focused on your current mouse position. |
| 🎯 Smart Mouse Tracking | Automatically tracks your cursor with configurable deadzones, follow speeds, and boundary locks. |
| 🛠️ Highly Configurable | Full control over zoom factors, animation speeds, tracking borders, and custom source bounds. |
| 🌐 Multi-Platform | Fully compatible across Windows, Linux, and macOS. |
| 🖥️ Dual Machine Support | Integrates with remote clients via UDP sockets for secondary machine setup. |
- Download or clone this repository (make sure you have
ZoomToMouse.Vx.x.x.lua). - Launch OBS Studio.
- Add a Display Capture source to your scene (recommended for automatic positioning).
- Go to Tools -> Scripts in OBS.
- Click the
+button and selectobs-zoom-to-mouse.lua.
For best results, configure your Display Capture source with these settings:
- Transform:
- Positional Alignment:
Top Left - Bounding Box Type:
Scale to inner bounds - Alignment in Bounding Box:
Top Left - Crop: All zeros
- Positional Alignment:
⚠️ Note: If you use custom bounds or crops, the script will attempt to auto-correct them. If you change your display layout in Windows/Linux/Mac, re-add the display capture source and reload the script.
You can fine-tune every parameter directly from the OBS Scripts window:
- Zoom Source: Choose which source to target.
- Zoom Factor & Speed: Adjust magnification power and transition smoothness.
- Auto Follow Mouse: Track cursor movement automatically when zoomed in.
- Follow Border & Lock Sensitivity: Define deadzones and safe areas where the camera stands still.
- Show All Sources: Enable targeting for window captures, browser sources, or cloned scenes (requires manual coordinate input).
- Original Creator: BlankSourceCode (obs-zoom-to-mouse)
- Inspiration: tryptech's obs-zoom-and-follow
- Updated & Maintained for Modern OBS: Timexo

