-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.GetTouchPosition
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Get touch position XY for a touch point index (relative to screen size)
| Parameter | Default Value | Note |
|---|---|---|
| index | 0 |
| Condition | Return Value |
|---|---|
| (always) | number |
raylib.InitWindow 800, 600, "Touch Position Demo"
while not raylib.WindowShouldClose
raylib.BeginDrawing
raylib.ClearBackground color.white
if raylib.GetTouchPointCount > 0 then
pos = raylib.GetTouchPosition(0)
raylib.DrawCircle pos[0], pos[1], 20, color.red
end if
raylib.EndDrawing
end while
raylib.CloseWindow