input_samplebase(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

✨ input_samplebase ✨

okay bestie, so this one's from the Arcan Lua API and it's called input_samplebase β€” it's literally the function that changes the coordinate system origo for a device πŸŽ€ (yes, "origo", that's the word the page uses, we're keeping it πŸ’…)


🌸 SYNOPSIS 🌸

nil
input_samplebase( devid, base_x, base_y, base_z )

that's it, that's the whole vibe β€” nil is the return value, and then the call takes devid, base_x, base_y, and base_z πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

so basically: this is primarily needed for mouse devices when you're working with absolute coordinates coming from a device, in the cases where just offsetting where the cursor is drawn isn't enough 😭 like, the simple fix doesn't always slay.

the maybe-easiest case where you'd need this? when mouse input should be locked to a surface and the internal tracking of the device should be shifted if it tries to go outside said surface πŸ”₯ so like, the device keeps its own internal tracking, but you nudge where the origo sits so its coordinates line up with your surface instead of wandering off into the void πŸ’€ no cap, that's the whole point.


🫢 reminder that the page calls it "primarily needed for mouse devices" β€” don't go inventing other use cases, i'm just relaying the scrolls πŸ“œβœ¨

🌈 SEE ALSO 🌈

  • iodev β€” the related page, go read it too, iykyk πŸ‘‘

and that's a wrap, bestie πŸ’œ this iconic lil page is from iodev, dated October 2026, and it's input_samplebase(3) β€” periodt πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from