raylib input and camera
Connects button presses and pointer positions to game-world actions. It separates held movement from one-time commands and accounts for camera transforms, interface capture and framebuffer scaling.
raylib-input-camera
See how it helpsWhen is it useful?
Use when zooming or high-resolution windows make selection inaccurate or movement behaves incorrectly.
What does it help you do?
- Separates one-time key edges from continuous movement.
- Converts screen positions before testing world objects.
- Keeps interface capture distinct from game input and checks framebuffer scaling.
Try asking this
Build mouse aiming and keyboard movement for our top-down archer. Pan and zoom the camera, hold attack and click an inventory slot. The aim must follow the world position, firing must follow the intended repeat rule and inventory interaction must not shoot through the menu.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
raylib — input camera
Use when implementing raylib input actions, screen/world conversion or 2D/3D cameras.
Version and project gate
Inspect The local raylib.h version, linked library, C/C++ build system, platform backend, asset paths, compile flags and ownership conventions. Match the cheatsheet to the linked version rather than assuming the current website API. Never turn a task into an engine upgrade without the user’s intent. Read the version-matching official reference when an API decision depends on it.
Work
Separate pressed/released edges from held input and define the units of movement. Route screen positions through the active camera transform before hit testing. Keep UI capture and gameplay input distinct. Inspect high-DPI window/framebuffer dimensions on the chosen backend.
Deliver
An action/coordinate contract and one complete control/camera interaction. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.
Failure to prevent
Do not treat a key edge as a continuous action or use screen coordinates as world positions after camera zoom.
Acceptance scenario
Zoom and pan, resize the window, hold input while pausing and click the same world object at several camera positions. Follow the project’s execution and verification permissions. If execution or a target device is unavailable, provide the reproduction steps and name the remaining uncertainty; do not mark it passed.
Scope and sources
This skill belongs to Flint. Agent selection is restricted by Orqestria’s assigned-agent policy, including forced skill selection; instruction text alone is not an access control. These are original task workflows researched from official documentation, not a copied or endorsed vendor skill.
Included files 1
SKILL.md
