Added mouse drag to move debug camera.

This commit is contained in:
2026-07-24 06:33:19 +02:00
parent 92717d3aef
commit fe14f2723c
+7
View File
@@ -1,5 +1,6 @@
package game package game
import "core:fmt"
import rl "vendor:raylib" import rl "vendor:raylib"
Debug :: struct { Debug :: struct {
@@ -65,6 +66,12 @@ debug_camera_update :: proc(debug: ^Debug) {
debug.camera.zoom += scroll * 0.1 debug.camera.zoom += scroll * 0.1
} }
} }
if rl.IsMouseButtonDown(.RIGHT) {
sensitivity: f32 = 0.32
mouse_move := rl.GetMouseDelta()
debug.camera.target -= ((mouse_move * sensitivity) / debug.camera.zoom)
}
} }
} }