Babylon.js-Kamera und Eingabe
Verbindet Kamerabewegung und Auswahl mit der beabsichtigten Spieleraktion. Trennt Maus-, Touch- und Oberflächeneingaben, damit Zielen, Ziehen und Klicken innerhalb der Spielfläche zusammenpassen.
babylonjs-camera-input
Entdecke, wie der Skill hilftWann ist der Skill hilfreich?
Nutze diesen Skill für zuverlässige Szenensteuerung bei Fokuswechsel, Größenänderung und Oberflächenbedienung.
Wobei hilft er dir?
- Trennt Geräteereignisse, Spielbefehle und Kameraglättung.
- Definiert Zeigerbindung, abgelehnte Sperren und Freigabe.
- Verhindert, dass Oberflächenklicks zusätzlich Spielaktionen auslösen.
Das könntest du fragen
In unserem 3D-Aufbauspiel soll Ziehen die Kamera drehen und Tippen ein Gebäude auswählen. Prüfe eine Spielfläche neben einer Seitenleiste, Touch und abgelehnte Mauszeigersperre. Ein Klick ins Baumenü darf dahinter kein Objekt platzieren.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
Babylon.js — camera input
Use when implementing Babylon camera control, pointer picking, touch or controller interaction.
Version and project gate
Inspect package.json and lockfile, Babylon package family and exact version, engine creation, WebGL/WebGPU choice, canvas hosting, loaders, physics plugin version and asset ownership. Keep Babylon Lite and the full engine APIs distinct. 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
Choose the camera behavior from the game’s movement contract. Separate raw device events from game actions, define pointer-lock and focus transitions, and translate canvas coordinates correctly. Keep interaction ray ownership separate from camera smoothing and UI hit testing.
Deliver
A control contract with capture/release behavior and one complete inspect/select/move interaction. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.
Failure to prevent
Pointer lock can fail or be lost; transparent UI must not let a gameplay click act twice.
Acceptance scenario
Resize and rotate the viewport, lose focus during held movement, reject pointer lock and try touch selection over UI. 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 Ziva. 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.
Enthaltene Dateien 1
SKILL.md
